Wednesday, April 27, 2011

MIGRATE FILE SYSTEM DATABASE TO ASM

1) OS/DB specifications

OS version is Oracle Solaris 10 and database version is 11.1.0.7

2)Modify init files 


Include the following parameters init file, to refer to the desired ASM disk groups
db_create_file_dest='+DATA01'
db_create_online_log_dest_1='+DATA01'



3) Converting database to ASM

a.Disable change tracking if enabled.

SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
SQL> SHUTDOWN IMMEDIATE
 
b. Restore the control file into new locations from location specified in the old PFILE:


SQL> startup nomount ;
RMAN> RESTORE CONTROLFILE FROM 'filename_of_old_control_file';
RMAN> ALTER DATABASE MOUNT;
 
d. Copy the database into the ASM disk group using the following command:
RMAN> BACKUP AS COPY DATABASE FORMAT '+disk_group';

Switch all datafiles into new ASM disk group
RMAN> SWITCH DATABASE TO COPY;
 
SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
 
RMAN> ALTER DATABASE OPEN; / SQL> ALTER DATABASE OPEN RESETLOGS;
 
If you were using change tracking for incremental backups, you can re-enable it now. For example:
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;
  
e. Cleanup of Non-ASM Files After ASM Migration
# delete datafiles
RMAN> DELETE COPY OF DATABASE;
RMAN> HOST 'rm old_online_redo_logs';
RMAN> HOST 'rmold_control_files';
 

No comments:

Post a Comment