Friday, 20 January 2017

Script to restore database until Point in time Recovery



export ORACLE_HOME=/app/oracle/product/11.2.0/dbhome_2
export ORACLE_SID=TDRARQ
BOX=`uname -a | awk '{print$2}'`
DAYNAM=`date | awk '{print$1}'`
# ----------------------------------
date
# ----------------------------------
rman nocatalog log=/home/oracle/scripts/full_restore_time.log <<EOF
connect target sys/WRWYTW
run {
set until time "TO_DATE('29-12-2016 10:00:00','DD-MM-YYYY HH24:MI:SS')";
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN RESETLOGS;
}
EOF

No comments:

Post a Comment