RMAN duplicate

Example RMAN duplicate quick instructions.

Ensure you have a successfully completed full rman backup.

We were going from ASM to non ASM so followed this

https://mohamedazar.com/2010/12/17/duplicate-database-from-asm-to-non-asm/

or use the official Oracle website.

In the init.ora file you will need.

db_file_name_convert=’+DATA’,’/prod1/db/apps_st/’
log_file_name_convert =("+FRA","/prod1/db/apps/onlinelog/")

I created a skeletion init_dup file.

Start up Auxiliary instance in NOMOUNT state

Note that the Oracle SID is set to database you want to copy into i.e. the one for prod1 – 
you just need a basic skeleton init file to start the database in mount

Where xxxx is the oracle home

SQL*Plus: Release 12.1.0.1.0 Production on Thu Apr 9 13:16:50 2015

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup nomount pfile=/xxxx/dbs/initPROD1_dup

ORACLE instance started.


Run the rman script to duplicate the database. The rman duplicate does all the hard work.

Set the environment and run:

$ rman auxiliary / cmdfile=commands.txt

Where commands.txt  is :

set echo on;

run {
allocate auxiliary channel d1 type disk;
allocate auxiliary channel d2 type disk;
allocate auxiliary channel d3 type disk ;
allocate auxiliary channel d4 type disk ;
duplicate database to PROD1 backup location '/backups/masking/';

release channel d1;
release channel d2;
release channel d3;
release channel d4 ;
}




Startup / shutdown the database. 

Run some integrity checks. 

No comments:

Post a Comment