2- Get the last SCN On Database since we will not have active redolog using the below
document :
SQL > select max(next_change#) from v$archived_log where archived = 'YES' group by
thread#;
Or Using RMAN:
Osama Mustafa
Page 1
run {
allocate channel d1 type disk format 'YOUR-PATH/Database_%U;
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
BACKUP DATABASE PLUS ARCHIVELOG;
backup current controlfile format 'YOUR_PATH/controlfile_%U';
release channel c1;
release channel c2;
release channel c3;
}
Now move all generated backup file to the new host with the same directory for example if you
backup on folder /u01/app then on new host should be the same.
Osama Mustafa
Page 2
1- export ORACLE_SID=SID_SAME_AS_PROD
RMAN TARGET /
RMAN > set dbid <as you get it from above query>;
RMAN > Startup nomount;
RMAN > restore spfile to pfile '/u01/app/oracle/oradata/orcl/initorcl.ora' from
autobackup;
RMAN> shutdown abort;
*.audit_file_dest=LOCATION
*.control_files=LOCATION
*.db_recovery_file_dest_size=Size
*.db_recovery_file_dest=LOCATION
*.diagnostic_dest=LOCATION
*.log_archive_dest_1='LOCATION=LOCATION
*.local_listener='LISTENER_ORCL'
Osama Mustafa
Page 3
Note: now you have 2 options 1 - move the backup to same location on target server 2- Copy
Backup to any location but you need to use CATALOG Command check below :
RMAN> catalog start with 'Where You copy Backup';
You are almost Done, You have But before restore database you can move datafile to any
location using (all the below steps on RMAN ) But
Remember don't run the below yet:
Osama Mustafa
Page 4
Osama Mustafa
Page 5
Thank you
Osama Mustafa
http://osamamustafa.blogspot.com
Twitter: @OsamaOracle
Osama Mustafa
Page 6
Osama Mustafa
Page 7