Wednesday, December 30, 2015

Performing Database point-in-time recovery (DBPITR) - Time-Based Recovery

In this post I want to explain how to Time-Based recovery to perform Incomplete recovry.

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;
run{
set until time “to_date(’05-oct-2015 13:00:00′, ‘dd-mon-rrrr hh24:mi:ss’)”;
restore database;
recover database;
}

alter database open resetlogs;


No comments:

Post a Comment