If the primary and standby databases are configured with

FAL_SERVER and FAL_CLIENT

parameters then gaps should not occur.

But still if the gaps occur do the following.


On the standby database.

SQL> select * from v$archive_gap;
Code:
THREAD#   LOW_SEQUENCE#   HIGH_SEQUENCE#
-------   --------------  ---------------
      1               30               40
The above query shows that their is a gap
from log sequence number 30 to 40.


On Primary Database.

Identify the logs required for gap resolution.

SQL> select name from v$archived_log
where thread# = 1
and dest_id = 1
and sequence# between 30 and 40;

Code:
NAME
--------------------------------
/u01/app/oracle/arch/archt1_s30.dbf
/u01/app/oracle/arch/archt1_s31.dbf
/u01/app/oracle/arch/archt1_s32.dbf
/u01/app/oracle/arch/archt1_s33.dbf
/u01/app/oracle/arch/archt1_s34.dbf
/u01/app/oracle/arch/archt1_s35.dbf
/u01/app/oracle/arch/archt1_s36.dbf
/u01/app/oracle/arch/archt1_s37.dbf
/u01/app/oracle/arch/archt1_s38.dbf
/u01/app/oracle/arch/archt1_s39.dbf
/u01/app/oracle/arch/archt1_s40.dbf
Copy the above files to standby database and register them
using the following commands.

SQL>alter database register logfile '/u01/app/oracle/arch/archt1_s30.dbf';
SQL>alter database register logfile '/u01/app/oracle/arch/archt1_s31.dbf';
SQL>alter database register logfile '/u01/app/oracle/arch/archt1_s32.dbf';
SQL>alter database register logfile '/u01/app/oracle/arch/archt1_s33.dbf';
SQL>alter database register logfile '/u01/app/oracle/arch/archt1_s34.dbf';
SQL>alter database register logfile '/u01/app/oracle/arch/archt1_s35.dbf';
SQL>alter database register logfile '/u01/app/oracle/arch/archt1_s36.dbf';
SQL>alter database register logfile '/u01/app/oracle/arch/archt1_s37.dbf';
SQL>alter database register logfile '/u01/app/oracle/arch/archt1_s38.dbf';
SQL>alter database register logfile '/u01/app/oracle/arch/archt1_s39.dbf';
SQL>alter database register logfile '/u01/app/oracle/arch/archt1_s40.dbf';


again query the v$archived_gap for any gaps. If there
are more gaps repeat the process until there are no gaps.

Put the physical standby database into managed recovery mode.

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