Wednesday 1 February 2017

Resolving Archived Redo Log Gaps Using Incremental Level 1 Backups

If your standby database is out of sync or if there is a missing archive log file , we can recover the standby database using the Incremental Level 1 Backup .



Check what is the current scn on the standby database

SQL>select current_scn from v$database;

CURRENT_SCN
-----------
     9449462486

Use this scn to take the incremental  Level 1 backup from the Primary database so that all the changes from the last applied archive can be captured from Primary.

RMAN> backup incremental from scn 9449462486 database format '/u02/inc_backup_%U';


Transfer these backups to the standby site suppose you are transferring it to the directory /u02/ in standby .

Now login to RMAN and catalog these incremental backup files.

RMAN> catalog start with '/u02/';

Now recover the standby database using the noredo option to apply only incremental backups.

RMAN> recover database noredo;


RMAN will apply only incremental backups to the standby database.

Then switch the redo log file on the primary database and apply it on the standby side:

# On the primary side
SQL>alter system switch logfile;
System altered.

#On the standby side
SQL>recover standby database;

No comments:

Post a Comment