Thursday, October 30, 2014

Resolving Gaps in DataGuard Physical Standby Using RMAN Incremental Backup


1.Defer log_archive_dest_state_2 in primary database

alter system set log_archive_dest_state_2='DEFER';

2.check Current_scn in primary and compare with Standby

SQL> select current_scn from v$database;
CURRENT_SCN
-----------
    3436343

3.alter database recover managed standby database cancel -->in standby
 rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Wed Oct 29 13:49:26 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: RMAN (DBID=1700890588)

RMAN>
run {
allocate channel c1 type disk format '/backup/%U.bkp';
backup incremental from scn 3436343 database;
}

4.Transfer the backup pieces to Standby location

5.Backup control file in Primary Database location and transfer to standby location

alter database create standby controlfile as '/tmp/control_standby.ctl';

6.Startup mount physical standby database with latest control file
alter database mount standby database;
rman target /
catalog start with '/backup/%U.bkp';

>recover database;

In Standby Database

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

Enable below command in primary

alter system set log_archive_dest_state_2='ENABLE'; 

No comments: