Rman Scenarios
Using restore and recover
Set db_file_recovery_dest
Take backup of prod and autobackup of controlfile
Copy to same exact location in target server
Copy pfile from prod to target
Copy password file from prod to target
Now on Target
Startup nomount
Restore control file from autobackup location using rman
alter database mount
restore database in rman
recover database in rman
alter database open resetlogs
If you want same db name in test as well stop here..
If you want to change db name then
backup control file to trace
copy from trace and change name of db and locations if needed and change reuse to set on top and save it as ctrl.ora
change pfile to the new db name and locations if needed.
startup nomount
@ctrl.ora
alter database open resetlogs
********************************************************************************************************************************************************
Now using duplicate
duplicate can be done from backup as well as active database
Take backup of prod
Copy to same exact location in target server
Copy pfile from prod to target
Copy password file from prod to target
Now on Target
Startup nomount
rman target sys/oracle@prod auxiliary /
duplicate target database to test;
Other scenario is active database with out using backup.
Using restore and recover
Set db_file_recovery_dest
Take backup of prod and autobackup of controlfile
Copy to same exact location in target server
Copy pfile from prod to target
Copy password file from prod to target
Now on Target
Startup nomount
Restore control file from autobackup location using rman
alter database mount
restore database in rman
recover database in rman
alter database open resetlogs
If you want same db name in test as well stop here..
If you want to change db name then
backup control file to trace
copy from trace and change name of db and locations if needed and change reuse to set on top and save it as ctrl.ora
change pfile to the new db name and locations if needed.
startup nomount
@ctrl.ora
alter database open resetlogs
********************************************************************************************************************************************************
Now using duplicate
duplicate can be done from backup as well as active database
Take backup of prod
Copy to same exact location in target server
Copy pfile from prod to target
Copy password file from prod to target
Now on Target
Startup nomount
rman target sys/oracle@prod auxiliary /
duplicate target database to test;
Other scenario is active database with out using backup.
No comments:
Post a Comment