'Data Guard - How to fix a gap in standby database?

I have a Data Guard with primary and standby database. But I have a problem, so my problem is like this. In primary if I query from v$archive_gap, I will get answer like this :

SQL> select * from v$archive_gap;

no rows selected

But if I query in standby database, I will get the answer like this :

    SQL> select * from v$archive_gap;
   THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
         1           185            233

I think it is because the log has a gap, but if check with log there is no-gap (sync). So i check again in primary and standby with another query like below :

    SQL> select thread#, max(sequence#) "Last Standby Seq Received" from v$archived_log val, v$database 
    vdb where val.resetlogs_change# = vdb.resetlogs_change# group by thread# order by 1;
THREAD# Last Standby Seq Received
---------- -------------------------
         1                       408

They will show the same number of sequences, both in primary and standby. So i think it was sync right ? But why my v$archive_gap in standby has many different in gap ?

Please help me



Solution 1:[1]

as far as i know, select * from v$archive_gap; is meant to be run on the standby database only

Try running the following as well. Again run only on the standby.

  set linesize 200
  set pagesize 2000
  col name format a30
  col value format a20
  col unit format a30
  col time_computed forma a20
  col datum_time format a20
  select name, value, unit, time_computed, datum_time
  from   v$dataguard_stats
  ;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 benbart