Wednesday, September 14, 2011

Duplicate Script for implementing Physical Standby

After you create backup of primary database using the BACKUP SCRIPT and transfered the files to the standby server run the following script to create the physical standby.

export ORACLE_BASE=/home/oracle
export ORACLE_HOME=/home/oracle/OraHome1
export PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/home/oracle/OraHome1/bin:.
export ORACLE_SID=LCDR

v_bdest=/backup/RMANBKUP/spool
####################### DUPLICATE DATABASE ##########################

rman target sys/password@PRDB auxiliary / << EOF
spool log to $v_bdest/StandbyDB.log append;
run {
allocate auxiliary channel a1 type disk format '/backup/RMANBKUP/%U';
allocate auxiliary channel a2 type disk format '/backup/RMANBKUP/%U';
duplicate target database for standby;
}
exit
EOF


Thanks

No comments:

Post a Comment

Followers

Powered By Blogger
 

RAC Database Administration. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com