RMAN Backup script to create Physical Standby DB
export ORACLE_HOME=/app/oracle/11.2.0
export ORACLE_SID=Cxxx1
BOX=`uname -a | awk '{print$2}'`
DAYNAM=`date | awk '{print$1}'`
# ----------------------------------
date
# ----------------------------------
rman nocatalog log=/home/oracle/scripts/full_backup_ARCHIVE.log <<EOF
connect target sys/erseee
run{
sql "alter system switch logfile";
allocate channel ch1 type disk format '/home/oracle/datapump/Cxxx1/Primary_bkp_for_stndby_%U';
backup as compressed backupset database plus archivelog;
backup as compressed backupset current controlfile for standby;
sql "alter system archive log current";
}
exit;
EOF
No comments:
Post a Comment