Move a database to ASM


If you are planning to migration LIVE your systems will be useful primarily examine the document 252219.1 on Oracle Support.
 
 
 sqlplus / as sysdba
 
 SQL> alter system set control_files='+DATA' scope=spfile;
 SQL> alter system set db_create_file_dest='+DATA' scope=spfile;
 SQL> alter system set db_recovery_file_dest='+DATA' scope=spfile;
 
 Oracle ASM files directly to your hard-disk group will be created automatically..
 
 SQL> shutdown immediate; 
 
 
 SQL> startup nomount; 
 
 
 rman target / 
 
 RMAN> restore controlfile from '/oracle/oradata/ANAR_DB/CONTROL01.ctl'; 
 
 
 RMAN> alter database mount; 
 
 
 RMAN> backup as copy database format '+DATA';
 
 
 
 RMAN> switch database to copy;
 
 Connected to the database in sqlplus . 
 
 SQL> recover database using backup controlfile until cancel;
 
 
 sqlplus / as sysdba
 
 SQL> alter database open resetlogs;
 
 
 SQL> alter database tempfile '/oracle/oradata/ANAR_DB/temp01.dbf' 2 drop including datafiles;
 SQL> alter tablespace temp add tempfile size 1000m 2 autoextend on next 100m maxsize unlimited;
 
 Then, the following commands are moved the ASM to SPFILE.
 
 SQL> create pfile='initANAR_DB.ora' from spfile;
 
 
 SQL> create spfile='+DATA/spfileANAR_DB.ora' from pfile='initANAR_DB.ora';
 
 Before we look at the current logfile's status.
 
 SQL> select group#,status from v$log; 
 
 GROUP# STATUS 
 ---------- ---------------- 
 1 CURRENT 
 2 UNUSED 
 3 UNUSED
 
 
 SQL> alter system switch logfile; 
 SQL> alter system switch logfile;
 
 Re-examine the situation.
 
 SQL> select group#,status from v$log; 
 
 GROUP# STATUS 
 ---------- ---------------- 
 1 ACTIVE 
 2 ACTIVE 
 3 CURRENT
 
 
 SQL> alter system checkpoint; 
 SQL> alter database drop logfile group 1; 
 SQL> alter database add logfile group 1 size 80m;
 
 
 SQL> alter system checkpoint 
 SQL> alter database drop logfile group 2; 
 SQL> alter database add logfile group 2 size 80m;
 
 
 SQL> alter system checkpoint 
 SQL> alter database drop logfile group 3; 
 SQL> alter database add logfile group 3 size 80m;
 
 
 SQL> select member from v$logfile
 
 So we went over the entire database to ASM.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: