In the following post, we’ll see how to perform Incomplete database level recovery (Time based Recovery) to a previous point in time.
STEP 1:- Start the database in mount mode.
- RMAN> connect target /
- RMAN> startup mount;
STEP 2:- Use the RMAN Set Until Time clause and set the time to the point in Time till where you want to restore recover the database. RMAN will restore and recover the database up to, but not including, the specified time.
- RMAN> set until time “to_date(’05-aug-2015 14:32:00′, ‘dd-mon-rrrr hh24:mi:ss’)”;
STEP 3:- Restore the Database
- RMAN> restore database;
STEP 4:- Recover the Database
- RMAN> recover database;
STEP 5:- Open the database with resetlogs.
- RMAN> alter database open resetlogs;
Use the following script:-
- connect target /
- startup mount;
- set until time “to_date(’05-oct-2006 14:00:00′, ‘dd-mon-rrrr hh24:mi:ss’)”;
- restore database;
- recover database;
- alter database open resetlogs;
I hope this post would be helpful in scenarios when you know the recovery process but as there is lot of stress on DBAs during recovery scenarios even googling at that time for the syntax is an overhead, hence the idea is to make a repository that cover all possibile recovery scenarios step by step with syntax of commands at a single destination. I would try to cover all the scenarios in my subsequent posts. Please comment if any of the curious readers are interested to know the internals of the recovery process like which process does that, what information is in redo that is applied to the datafiles to recover them to point in time and etc.
PLEASE COMMENT IF YOU FACE ANY ERRORS WHEN PERFORMING THIS RECOVERY SO THAT WE CAN WORK ON THOSE AND ENHANCE THIS REPOSITORY FOR OTHER READERS.