Resolving Gaps in Data Guard Apply Using Incremental RMAN BAckup


for simplicity, Gap is a range of archived redo logs that were created at a time when the standby database was not available to receive them.

in many practices it happen because the network problems.

We have 3 method to resolving this problem. i'll dispatch it to two main methods,

  1. Manually resolving
  2. Automatic resolving : Using log switched and FAL configuration


1. start with detecting gaps in the redo logs by querying the v$archive_gap

SQL> select * from v$archive_gap;
thread# low_sequence# high_sequence#
-------- ---------------- ------------------
     1          30           34 

  the output indicates our standby database is currently missing log files from sequence 30 to

  34.

2. issue following statement on primary database to locate the archived redo log files. assuming 

  the local archive destination on primary is LOG_ARCHIVE_DEST_1

SQL> select name from v$archived_log where thread#=1 and dest_id=1 and sequence# between 30 and 34; 
name
----------------------------------
/u02/oraarchive/DB01/arch_t1_s30.dbf  
/u02/oraarchive/DB01/arch_t1_s31.dbf  
/u02/oraarchive/DB01/arch_t1_s32.dbf  
/u02/oraarchive/DB01/arch_t1_s33.dbf  
/u02/oraarchive/DB01/arch_t1_s34.dbf 

3. stop the automatic recovery (MRP) of the data guard

SQL> alter database recover managed standby database cancel;

4. transfer manually the archived log files shown on the step 2 to standby database

5. register that archived log files on standby database

SQL> alter database register logfile '/u02/oraarchive/DB01/arch_t1_s30.dbf'; 
SQL> alter database register logfile '/u02/oraarchive/DB01/arch_t1_s31.dbf'; 
SQL> alter database register logfile '/u02/oraarchive/DB01/arch_t1_s32.dbf'; 
SQL> alter database register logfile '/u02/oraarchive/DB01/arch_t1_s33.dbf'; 
SQL> alter database register logfile '/u02/oraarchive/DB01/arch_t1_s34.dbf'; 

6. put the standby database into automatic recovery managed mode

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

7. verify that the gap gets resolved on standby database

SQL> select sequence#, applied from v$archived_log order by sequence#; 


now you figure it out, that your archived log files (ARCLs) has been synchronize with your primary database. as a DBA you must take a notice at log using this SQL statement

SQL> select message from v$dataguard_status where severity like 'Warning';

also on your alert.log

hope it will make your day easier.


To view or add a comment, sign in

More articles by Ankit Aggarwal

  • ORACLE EXADATA Basics

    1-EXADATA / EXADATA CLOUD - 2-CS public CLOUD service / 3-CC CLOUD@CUSTOMER-using control plane(software) + advance…

  • How to check RAC database status

    simply answer is Oracle provides the crs and srvctl command utility for checking on the external status of RAC…

  • Difference between the Checkpoint and SCN

    Checkpoint Checkpoint in database is used to reduce the amount of the time for recovery. It is a background process in…

  • The difference between Cloning and Refreshing

    The difference between Cloning and Refreshing is that cloning process includes Oracle Home + database Clone; where as…

  • Oracle Histograms

    Gather stats for column level is called histogram. A histogram is a special type of column statistic that provides more…

    1 Comment
  • Oracle Memory Structure INSIDEs

    ***This is my pick-up for oracle memory. thanks in advance pls share your tips on Oracle Memory Structure insides*** 1.

  • Interview inception @lockdown4 India:

    - Don't illustrate something nearby, higher up concept to sound like an expert or related to the question Simply say I…

  • Lockdown .0 INDIA & logswitch per hour...cheers

    5 log switches per hour (maximum) & 3 Log switches per hour (ideal),recommended by oracle In a production environment…

  • Lockdown 3.0 India & Is it possible to use OLR without OCR in RAC?

    Answer is No, interesting and thought provoking This is introduced in Oracle 11gR2 which will have all the resource…

  • Lockdown in INDIA & unlocking Oracle OCR & OLR meanwhile

    ORACLE LOCAL REGISTRY(OLR) contains node-specific information required by OHASD . Every node has its own dedicated OLR…

Others also viewed

Explore content categories