Friday, November 25, 2011

Restoring from an Older Backup

Database can be restored from the older backup in two ways

  1. using tag names
  2. using restore...until
Using Tag names

RMAN> startup mount;
RMAN> restore database from tag Nov_backup;
RMAN> recover database;
RMAN> alter database open;

Using restore ... until

Use the restore ... until command to perform complete recovery. If incomplete recovery needs to be performed, then you will need to use the recover ... until command.

Restore...until can be used in one of the following ways
  1. Until SCN
  2. Until sequence
  3. Until restore point
  4. Until time
Until SCN
RMAN> startup mount;
RMAN> restore database until SCN 1254174; 
RMAN> recover database;
RMAN> alter database open;

Until sequence
RMAN> startup mount;
RMAN> restore database until sequence 21;
RMAN> recover database;
RMAN> alter database open;

Until restore point
RMAN> startup mount;
RMAN> restore database until restore point Monday_RP;
RMAN> recover database;
RMAN> alter database open;

Until time
RMAN> startup mount;
RMAN> restore database until time 'sysdate – 5';
RMAN> recover database;
RMAN> alter database open;

No comments:

Post a Comment