Skip to content

DATABASE RESTORATION UNTIL TIME

In order to restore the database until a specific time with your rman catalogue

RUN the following queries in the RMAN CATALOG

sqlplus <catlog user>/<password>@<catlog tns>

alter session set nls_date_format='DD-MM-yyyy hh:mi:ss';
select DB_NAME,STATUS,COMPLETION_TIME from RC_BACKUP_CONTROLFILE where DB_NAME='CRMPROD' and rownum < 11 order by CREATION_TIME;

now from here chose the date the time till when we need to restore the Database.

and place in the restoration script

export ORACLE_HOME={ORACLE HOME}
export ORACLE_SID={ORACLE SID}
$ORACLE_HOME/bin/rman catalog=<catlog user>/<password>@<catlog tns> << EOF
connect target /
run
{
set until time "to_date('16-08-2012 02:56:03','dd-mm-yyyy- hh24:mi:ss')";
allocate channel c1 device type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
restore database ;
release channel c1;
}
EOF