SlideShare a Scribd company logo
1 of 7
For more Please Visit ---> https://marthadba.blogspot.in
Migrate From Database File system to ASM
TO MIGRATE the database files from disk to ASM disk is as follows:
1.Configure flash recovery area.
2. Migrate datafiles to ASM.
3. Control file to ASM.
4. Create Temporary tablespace.
5. Migrate Redo logfiles
6. Migrate spfile to ASM.
Step 1: Configure flash recovery area.
SQL> connect sys/sys@prod1 as sysdba
Connected.
SQL> alter database disable block change tracking;
Database altered.
SQL> alter system set db_recovery_file_dest_size=500m;
System altered.
SQL> alter system set db_recovery_file_dest=’+RECOVERYDEST’;
System altered
Step 2 and 3: Migrate data files and control file to ASM.
Use RMAN to migrate the data files to ASM disk groups.
All data files will be migrated to the newly created disk group, DATA
SQL> alter system set db_create_file_dest=’+DATA’;
System altered.
SQL> alter system set control_files=’+DATA/ctf1.dbf’ scope=spfile;
System altered.
SQL> shut immediate
[oracle@rac1 bin]$ ./rman target /
RMAN> startup nomount
Oracle instance started
RMAN> restore controlfile from ‘/u01/new/oracle/oradata/mydb/control01.ctl’;
Starting restore at 08-DEC-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=146 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATA/ctf1.dbf
Finished restore at 08-DEC-09
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> backup as copy database format ‘+DATA’;
Starting backup at 08-DEC-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=146 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/new/oracle/oradata/mydb/system01.dbf
output file name=+DATA/mydb/datafile/system.257.705063763 tag=TAG20091208T110241
RECID=1 STAMP=705064274
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:08:39
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/u01/new/oracle/oradata/mydb/sysaux01.dbf
output file name=+DATA/mydb/datafile/sysaux.258.705064283 tag=TAG20091208T110241
RECID=2 STAMP=705064812
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:08:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/u01/new/oracle/oradata/mydb/undotbs01.dbf
output file name=+DATA/mydb/datafile/undotbs1.259.705064821 tag=TAG20091208T110241
RECID=3 STAMP=705064897
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:25
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=+DATA/mydb/controlfile/backup.260.705064907tag=TAG20091208T110241
RECID=4 STAMP=705064912
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/u01/new/oracle/oradata/mydb/users01.dbf
output file name=+DATA/mydb/datafile/users.261.705064915 tag=TAG20091208T110241
RECID=5 STAMP=705064915
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 08-DEC-09
channel ORA_DISK_1: finished piece 1 at 08-DEC-09
piece
handle=+DATA/mydb/backupset/2009_12_08/nnsnf0_tag20091208t110241_0.262.705064919
tag=TAG20091208T110241 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-DEC-09
RMAN> switch database to copy;
datafile 1 switched to datafile copy “+DATA/mydb/datafile/system.257.705063763”
datafile 2 switched to datafile copy “+DATA/mydb/datafile/sysaux.258.705064283”
datafile 3 switched to datafile copy “+DATA/mydb/datafile/undotbs1.259.705064821”
datafile 4 switched to datafile copy “+DATA/mydb/datafile/users.261.705064915”
RMAN> alter database open;
database opened
RMAN> exit
Recovery Manager complete.
SQL> conn sys/oracle as sysdba
Connected.
SQL> select tablespace_name,file_name from dba_data_files;
TABLESPACE_NAME FILE_NAME
—————————— ———————————————
USERS +DATA/mydb/datafile/users.261.705064915
UNDOTBS1 +DATA/mydb/datafile/undotbs1.259.705064821
SYSAUX +DATA/mydb/datafile/sysaux.258.705064283
SYSTEM +DATA/mydb/datafile/system.257.705063763
SQL> select name from v$controlfile;
NAME
——–
+DATA/ctf1.dbf
Step 4: Migrate temp tablespace to ASM.
SQL> alter tablespace temp add tempfile size 100m;
Tablespace altered.
SQL> select file_name from dba_temp_files;
FILE_NAME
———————————————
+DATA/mydb/tempfile/temp.263.705065455
otherwise,
Create temporary tablespace in ASM disk group.
SQL> CREATE TABLESPACE temp1 ADD TEMPFILE ‘+diskgroup1’;
Step 5: Migrate redo logs to ASM.
SQL> select member,group#from v$logfile;
MEMBER GROUP#
————————————————– ———-
/u01/new/oracle/oradata/mydb/redo03.log 3
/u01/new/oracle/oradata/mydb/redo02.log 2
/u01/new/oracle/oradata/mydb/redo01.log 1
SQL> alter database add logfile group 4 size 5m;
Database altered.
SQL> alter database add logfile group 5 size 5m;
Database altered.
SQL> alter database add logfile group 6 size 5m;
Database altered.
SQL> select member,group#from v$logfile;
MEMBER GROUP#
————————————————– ———-
/u01/new/oracle/oradata/mydb/redo03.log 3
/u01/new/oracle/oradata/mydb/redo02.log 2
/u01/new/oracle/oradata/mydb/redo01.log 1
+DATA/mydb/onlinelog/group_4.264.705065691 4
+DATA/mydb/onlinelog/group_5.265.705065703 5
+DATA/mydb/onlinelog/group_6.266.705065719 6
SQL> alter system switch logfile;
System altered.
SQL> alter database drop logfile group 2;
Database altered.
SQL> alter database drop logfile group 3;
Database altered.
SQL> alter database drop logfile group 4;
Database altered.
SQL> alter database drop logfile group 1;
Database altered.
Add additional control file.
If an additional control file is required for redundancy, you can create it in ASM as you would
on any other filesystem.
SQL> connect sys/sys@prod1 as sysdba
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.
SQL> alter database backup controlfile to ‘+DATA/cf2.dbf’;
Database altered.
SQL> alter system set control_files=’+DATA/cf1.dbf ‘,’+DATA/cf2.dbf’ scope=spfile;
System altered.
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
SQL> select name from v$controlfile;
NAME
—————————————
+DATA/cf1.dbf
+DATA/cf2.dbf
step 6:Migrate spfile to ASM:
Create a copy of the SPFILE in the ASM disk group.
In this example, the SPFILE for the migrated database will be stored as +DISK/spfile.
If the database is using an SPFILE already, then run these commands:
run {
BACKUP AS BACKUPSET SPFILE;
RESTORE SPFILE TO “+DISK/spfile”;
}
If you are not using an SPFILE, then use CREATE SPFILE from SQL*Plus to create the new
SPFILE in ASM.
For example, if your parameter file is called /private/init.ora, use the following command:
SQL> create spfile=’+DISK/spfile’ from pfile=’/private/init.ora’;
NOTE:
After successfully migrating all the data files over to ASM, the old data files are no longer
needed and can be removed. Your single-instance database is now running on ASM
For more Please Visit ---> https://marthadba.blogspot.in

More Related Content

What's hot

Clase 09 03-2013
Clase 09 03-2013Clase 09 03-2013
Clase 09 03-2013
sayajeff
 
Basic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition PresentationBasic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition Presentation
N/A
 
FIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GFIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11G
N/A
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
Deepti Singh
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
Deepti Singh
 
Flashback (Practical Test)
Flashback (Practical Test)Flashback (Practical Test)
Flashback (Practical Test)
Anar Godjaev
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
subhani shaik
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
Controlfilemanagement
Vinay Thota
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11g
uzzal basak
 
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
Raheel Syed
 

What's hot (20)

Clase 09 03-2013
Clase 09 03-2013Clase 09 03-2013
Clase 09 03-2013
 
Basic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition PresentationBasic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition Presentation
 
FIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GFIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11G
 
12c installation
12c installation12c installation
12c installation
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
 
Installing oracle grid infrastructure and database 12c r1
Installing oracle grid infrastructure and database 12c r1Installing oracle grid infrastructure and database 12c r1
Installing oracle grid infrastructure and database 12c r1
 
12c (12.1) Database installation on Solaris 11(11.2)
12c (12.1) Database  installation on Solaris 11(11.2)12c (12.1) Database  installation on Solaris 11(11.2)
12c (12.1) Database installation on Solaris 11(11.2)
 
Flashback (Practical Test)
Flashback (Practical Test)Flashback (Practical Test)
Flashback (Practical Test)
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
 
How To Install and Configure Log Rotation on RHEL 7 or CentOS 7
How To Install and Configure Log Rotation on RHEL 7 or CentOS 7How To Install and Configure Log Rotation on RHEL 7 or CentOS 7
How To Install and Configure Log Rotation on RHEL 7 or CentOS 7
 
監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜
 
Change DB Name
Change DB NameChange DB Name
Change DB Name
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman script
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
Controlfilemanagement
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11g
 
Oracle GoldenGate
Oracle GoldenGateOracle GoldenGate
Oracle GoldenGate
 
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
 
Cloning Oracle EBS R12: A Step by Step Procedure
Cloning Oracle EBS R12: A Step by Step ProcedureCloning Oracle EBS R12: A Step by Step Procedure
Cloning Oracle EBS R12: A Step by Step Procedure
 
Vbox virtual box在oracle linux 5 - shoug 梁洪响
Vbox virtual box在oracle linux 5 - shoug 梁洪响Vbox virtual box在oracle linux 5 - shoug 梁洪响
Vbox virtual box在oracle linux 5 - shoug 梁洪响
 

Viewers also liked

Lecture 3 multimedia databases
Lecture 3   multimedia databasesLecture 3   multimedia databases
Lecture 3 multimedia databases
Ranjana N Jinde
 
MultiMedia dbms
MultiMedia dbmsMultiMedia dbms
MultiMedia dbms
Tech_MX
 
Lecture 10 distributed database management system
Lecture 10   distributed database management systemLecture 10   distributed database management system
Lecture 10 distributed database management system
emailharmeet
 
Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database System
Sulemang
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systems
karan2190
 

Viewers also liked (16)

Introduction to Distributed Architecture
Introduction to Distributed ArchitectureIntroduction to Distributed Architecture
Introduction to Distributed Architecture
 
Database File System
Database File SystemDatabase File System
Database File System
 
Multimedia db system
Multimedia db systemMultimedia db system
Multimedia db system
 
Distributed Database Management System(DDMS)
Distributed Database Management System(DDMS)Distributed Database Management System(DDMS)
Distributed Database Management System(DDMS)
 
Multimedia database
Multimedia databaseMultimedia database
Multimedia database
 
Multimedia Database
Multimedia DatabaseMultimedia Database
Multimedia Database
 
Multimedia database
Multimedia databaseMultimedia database
Multimedia database
 
Lecture 11 - distributed database
Lecture 11 - distributed databaseLecture 11 - distributed database
Lecture 11 - distributed database
 
Lecture 3 multimedia databases
Lecture 3   multimedia databasesLecture 3   multimedia databases
Lecture 3 multimedia databases
 
MultiMedia dbms
MultiMedia dbmsMultiMedia dbms
MultiMedia dbms
 
Distributed database management systems
Distributed database management systemsDistributed database management systems
Distributed database management systems
 
Multimedia Database
Multimedia Database Multimedia Database
Multimedia Database
 
Lecture 10 distributed database management system
Lecture 10   distributed database management systemLecture 10   distributed database management system
Lecture 10 distributed database management system
 
Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database System
 
Presentation on Database management system
Presentation on Database management systemPresentation on Database management system
Presentation on Database management system
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systems
 

Similar to Migrate from database file system to asm

Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
subhani shaik
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New Features
Enkitec
 
Oracle Managed Files
Oracle Managed FilesOracle Managed Files
Oracle Managed Files
Anar Godjaev
 
使用Prm恢复受损的oracle数据表几个例子
使用Prm恢复受损的oracle数据表几个例子使用Prm恢复受损的oracle数据表几个例子
使用Prm恢复受损的oracle数据表几个例子
maclean liu
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradation
influxbob
 

Similar to Migrate from database file system to asm (20)

آموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهم
آموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهمآموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهم
آموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهم
 
br_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docbr_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.doc
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Rec
 
Kp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userKp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan user
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
 
Migrate database to Exadata using RMAN duplicate
Migrate database to Exadata using RMAN duplicateMigrate database to Exadata using RMAN duplicate
Migrate database to Exadata using RMAN duplicate
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New Features
 
Oracle Managed Files
Oracle Managed FilesOracle Managed Files
Oracle Managed Files
 
Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Features
 
RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)
 
使用Prm恢复受损的oracle数据表几个例子
使用Prm恢复受损的oracle数据表几个例子使用Prm恢复受损的oracle数据表几个例子
使用Prm恢复受损的oracle数据表几个例子
 
[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery[Altibase] 13 backup and recovery
[Altibase] 13 backup and recovery
 
Recovery case: All the Control file are lost
Recovery case: All the Control file are lostRecovery case: All the Control file are lost
Recovery case: All the Control file are lost
 
Oracle database hot backup and recovery
Oracle database hot backup and recoveryOracle database hot backup and recovery
Oracle database hot backup and recovery
 
Less04 Instance
Less04 InstanceLess04 Instance
Less04 Instance
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under control
 
LVOUG meetup #4 - Case Study 10g to 11g
LVOUG meetup #4 - Case Study 10g to 11gLVOUG meetup #4 - Case Study 10g to 11g
LVOUG meetup #4 - Case Study 10g to 11g
 
Les 05 create_bu
Les 05 create_buLes 05 create_bu
Les 05 create_bu
 
Oracle ORA Errors
Oracle ORA ErrorsOracle ORA Errors
Oracle ORA Errors
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradation
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Migrate from database file system to asm

  • 1. For more Please Visit ---> https://marthadba.blogspot.in Migrate From Database File system to ASM TO MIGRATE the database files from disk to ASM disk is as follows: 1.Configure flash recovery area. 2. Migrate datafiles to ASM. 3. Control file to ASM. 4. Create Temporary tablespace. 5. Migrate Redo logfiles 6. Migrate spfile to ASM. Step 1: Configure flash recovery area. SQL> connect sys/sys@prod1 as sysdba Connected. SQL> alter database disable block change tracking; Database altered. SQL> alter system set db_recovery_file_dest_size=500m; System altered. SQL> alter system set db_recovery_file_dest=’+RECOVERYDEST’; System altered Step 2 and 3: Migrate data files and control file to ASM. Use RMAN to migrate the data files to ASM disk groups. All data files will be migrated to the newly created disk group, DATA SQL> alter system set db_create_file_dest=’+DATA’; System altered. SQL> alter system set control_files=’+DATA/ctf1.dbf’ scope=spfile; System altered. SQL> shut immediate [oracle@rac1 bin]$ ./rman target /
  • 2. RMAN> startup nomount Oracle instance started RMAN> restore controlfile from ‘/u01/new/oracle/oradata/mydb/control01.ctl’; Starting restore at 08-DEC-09 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=146 device type=DISK channel ORA_DISK_1: copied control file copy output file name=+DATA/ctf1.dbf Finished restore at 08-DEC-09 RMAN> alter database mount; database mounted released channel: ORA_DISK_1 RMAN> backup as copy database format ‘+DATA’; Starting backup at 08-DEC-09 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=146 device type=DISK channel ORA_DISK_1: starting datafile copy input datafile file number=00001 name=/u01/new/oracle/oradata/mydb/system01.dbf output file name=+DATA/mydb/datafile/system.257.705063763 tag=TAG20091208T110241 RECID=1 STAMP=705064274 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:08:39 channel ORA_DISK_1: starting datafile copy input datafile file number=00002 name=/u01/new/oracle/oradata/mydb/sysaux01.dbf output file name=+DATA/mydb/datafile/sysaux.258.705064283 tag=TAG20091208T110241 RECID=2 STAMP=705064812 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:08:56 channel ORA_DISK_1: starting datafile copy input datafile file number=00003 name=/u01/new/oracle/oradata/mydb/undotbs01.dbf output file name=+DATA/mydb/datafile/undotbs1.259.705064821 tag=TAG20091208T110241 RECID=3 STAMP=705064897 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:25 channel ORA_DISK_1: starting datafile copy copying current control file
  • 3. output file name=+DATA/mydb/controlfile/backup.260.705064907tag=TAG20091208T110241 RECID=4 STAMP=705064912 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07 channel ORA_DISK_1: starting datafile copy input datafile file number=00004 name=/u01/new/oracle/oradata/mydb/users01.dbf output file name=+DATA/mydb/datafile/users.261.705064915 tag=TAG20091208T110241 RECID=5 STAMP=705064915 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 08-DEC-09 channel ORA_DISK_1: finished piece 1 at 08-DEC-09 piece handle=+DATA/mydb/backupset/2009_12_08/nnsnf0_tag20091208t110241_0.262.705064919 tag=TAG20091208T110241 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 08-DEC-09 RMAN> switch database to copy; datafile 1 switched to datafile copy “+DATA/mydb/datafile/system.257.705063763” datafile 2 switched to datafile copy “+DATA/mydb/datafile/sysaux.258.705064283” datafile 3 switched to datafile copy “+DATA/mydb/datafile/undotbs1.259.705064821” datafile 4 switched to datafile copy “+DATA/mydb/datafile/users.261.705064915” RMAN> alter database open; database opened RMAN> exit Recovery Manager complete. SQL> conn sys/oracle as sysdba Connected. SQL> select tablespace_name,file_name from dba_data_files;
  • 4. TABLESPACE_NAME FILE_NAME —————————— ——————————————— USERS +DATA/mydb/datafile/users.261.705064915 UNDOTBS1 +DATA/mydb/datafile/undotbs1.259.705064821 SYSAUX +DATA/mydb/datafile/sysaux.258.705064283 SYSTEM +DATA/mydb/datafile/system.257.705063763 SQL> select name from v$controlfile; NAME ——– +DATA/ctf1.dbf Step 4: Migrate temp tablespace to ASM. SQL> alter tablespace temp add tempfile size 100m; Tablespace altered. SQL> select file_name from dba_temp_files; FILE_NAME ——————————————— +DATA/mydb/tempfile/temp.263.705065455 otherwise, Create temporary tablespace in ASM disk group. SQL> CREATE TABLESPACE temp1 ADD TEMPFILE ‘+diskgroup1’; Step 5: Migrate redo logs to ASM. SQL> select member,group#from v$logfile; MEMBER GROUP# ————————————————– ———- /u01/new/oracle/oradata/mydb/redo03.log 3 /u01/new/oracle/oradata/mydb/redo02.log 2 /u01/new/oracle/oradata/mydb/redo01.log 1
  • 5. SQL> alter database add logfile group 4 size 5m; Database altered. SQL> alter database add logfile group 5 size 5m; Database altered. SQL> alter database add logfile group 6 size 5m; Database altered. SQL> select member,group#from v$logfile; MEMBER GROUP# ————————————————– ———- /u01/new/oracle/oradata/mydb/redo03.log 3 /u01/new/oracle/oradata/mydb/redo02.log 2 /u01/new/oracle/oradata/mydb/redo01.log 1 +DATA/mydb/onlinelog/group_4.264.705065691 4 +DATA/mydb/onlinelog/group_5.265.705065703 5 +DATA/mydb/onlinelog/group_6.266.705065719 6 SQL> alter system switch logfile; System altered. SQL> alter database drop logfile group 2; Database altered. SQL> alter database drop logfile group 3; Database altered. SQL> alter database drop logfile group 4; Database altered.
  • 6. SQL> alter database drop logfile group 1; Database altered. Add additional control file. If an additional control file is required for redundancy, you can create it in ASM as you would on any other filesystem. SQL> connect sys/sys@prod1 as sysdba Connected to an idle instance. SQL> startup mount ORACLE instance started. SQL> alter database backup controlfile to ‘+DATA/cf2.dbf’; Database altered. SQL> alter system set control_files=’+DATA/cf1.dbf ‘,’+DATA/cf2.dbf’ scope=spfile; System altered. SQL> shutdown immediate; ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. SQL> select name from v$controlfile; NAME ————————————— +DATA/cf1.dbf +DATA/cf2.dbf step 6:Migrate spfile to ASM: Create a copy of the SPFILE in the ASM disk group. In this example, the SPFILE for the migrated database will be stored as +DISK/spfile. If the database is using an SPFILE already, then run these commands: run { BACKUP AS BACKUPSET SPFILE;
  • 7. RESTORE SPFILE TO “+DISK/spfile”; } If you are not using an SPFILE, then use CREATE SPFILE from SQL*Plus to create the new SPFILE in ASM. For example, if your parameter file is called /private/init.ora, use the following command: SQL> create spfile=’+DISK/spfile’ from pfile=’/private/init.ora’; NOTE: After successfully migrating all the data files over to ASM, the old data files are no longer needed and can be removed. Your single-instance database is now running on ASM For more Please Visit ---> https://marthadba.blogspot.in