Friday, June 19, 2015

RMAN point-in time recovery

Scenario:  RMAN recovery

Database Server(Unix) got crashed on Saturday.
Database recovery should be done till close of business hours on Friday.
Daily RMAN hot backup is scheduled.
Backup goes to disk and then it is getting backed up to tape along with server backup.

Steps:

  1. Backup team restored the server backup
  2. Server team rebuilt and created all the required file systems and zones are in place
  3. Database team to restore the RMAN backup and perform recovery


We are interested in the last step how to restore and recover the database.
It is pretty simple and straightforward..

1)Find the control file backup piece from backup
list backup of controlfile;
list backup summary;

2) Restore the control file from backup
RMAN> startup nomount;
RMAN> restore controlfile from ‘/u02/backups/rman/live/hot/LIVE_rman_hotbackup_CTL_c-716308851-20150605-00.ctl’;

3) Mount the database and restore the database and recover. Use the set until time clause to the point you want to recover the database.

RMAN> alter database mount;

RMAN> run
{
set until time "to_date('05-06-2015:18:00:00','DD-MM-YYYY:HH24:MI:SS')";
restore database;
recover database;
}

4) Open the database

RMAN> ALTER DATABASE OPEN RESETLOGS;



No comments: