RMAN Duplicate Database Using Target and Catalog Connection
Steps to create Auxiliary Database
Step 1 : Installation of Oracle Database software on Auxiliary database host (in case of duplicating on new host).
Step 2 : Create Password File for Auxiliary Database
Execute below command in auxiliary database
orapwd file=orapwDWD_TEMP password=manager
Step 3 : Create an Initialization Parameter for the Auxiliary Database
Copy the initialization parameter from the target database and make the necessary changes for
the auxiliary database.
If the datafile and log file locations are different then use below parameters to convert
db_file_name_convert
log_file_name_convert
eg: *.db_file_name_convert=('<Target Data file path>','<Auxiliary Data file path>')
*.log_file_name_convert=('<Target log file path>','<Auxiliary log file path>')
make below entry in Auxiliary instance Init file (needed only in case of RAC target Database)
_no_recovery_through_resetlogs= TRUE
Step 4 : Verify the create the necessary directories.
Step 5 : Create spfile from pfile
Step 6 : Establish Oracle Net Connectivity in Auxiliary Instance
On Auxiliary database
In listener.ora edit the file to add below
(SID_DESC =
(SID_NAME = DWD_TEMP)
(ORACLE_HOME = /orabin/oracle/product/10.2.0/db_1)
#(PROGRAM = extproc)
)
In tnsnames.ora add the RMAN catalog database and TARGET database tns entry
Test the connection from Auxiliary to target and Catalog database.
Step 7 : Start the Auxiliary instance in nomount state
$ sqlplus "/ as sysdba"
$ startup nomount
Step 8 : Check Media library client and softlink exist in Auxiliary instance.
1. Verify media client and rman client is installed on Auxiliary instance server.
2. Verify whether backup lib exist , if not create softlink under $ORACLE_HOME/lib
[dev@psrdrd01 lib]$cd $ORACLE_HOME/lib
[dev@psrdrd01 lib]$ls –ltr libobk.so
lrwxrwxrwx 1 bidev oinstall 36 May 31 10:47 libobk.so -> /opt/omni/lib/libob2oracle8_64bit.so
If libobk.so file doesn’t exist, please create softlink pointing it to media library
[dev@psrdrd01 lib]$ ln -s /opt/omni/lib/libob2oracle8_64bit.so libobk.so
[dev@psrdrd01 lib]$ ls -ltr libobk.so
lrwxrwxrwx 1 bidev oinstall 36 May 31 10:47 libobk.so -> /opt/omni/lib/libob2oracle8_64bit.so
Note : Above media libraries refers to Data Protector media library
Step 9 : Establish connection to 3 instance through RMAN
rman TARGET SYS/<pwd>@PROD CATALOG rman/<pwd>@rmandb AUXILIARY
SYS/manager@dwd_temp
Step 10 : Verify the backup exist and able to read from tape
List backup;
Step 11 : Execute below rman script
run {
ALLOCATE AUXILIARY CHANNEL ch1 DEVICE TYPE sbt;
ALLOCATE AUXILIARY CHANNEL ch2 DEVICE TYPE sbt;
duplicate target database to <NEW SID> UNTIL TIME = "TO_DATE('30/05/2011 23:00:00','DD/MM/YYYY HH24:MI:SS')";
}
Note : define the sbt parameters if media client not able to identify
Eg : for Networker media
sbt parms 'ENV=(NSR_SERVER=<Networker Server>,NSR_CLIENT=<target
server>,NSR_DATA_VOLUME_POOL=<Pool Name>)';
refer notes:
No comments:
Post a Comment