Wednesday, 24 September 2014

Roll Forward Physical Standby Database using RMAN incremental backup


There would be scenarios where the standby database lags far behind from the primary database leading to Archive Gap. It could be due to one of various reasons.It might be due to the network outage between the primary and the standby database leading to the archive gaps. While there is a network problem, some archived logs in primary database could have been deleted somehow.


Primary :

SQL> select current_scn from v$database;

CURRENT_SCN
-----------
    3187837
   
Standby :

SQL> select current_scn from v$database;

CURRENT_SCN
-----------
    3153120

In such cases where the standby lags far behind from the primary database, incremental backups can be used as one of the  methods to roll forward the physical standby database to have it in sync with the primary database.

Standby :
   
SQL -> recover managed standby database cancel;
SQL -> shutdown (immediate)

Primary :

RMAN -> backup incremental from scn 3153120 database format 'c:\incremental\inc_%U.bak';
SQL -> alter database create standby controlfile as  'c:\incremental\CONTROL03.ctl';
   
Standby :

SQL> startup nomount

copy & replace standby control files....
SQL> alter database mount standby database;

RMAN> catalog start with 'C:\incremental';
RMAN> recover database noredo;

SQL> alter database recover managed standby database disconnect from session;

No comments:

Post a Comment