Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

StandbyDB is not in sync with primary

YoavMar 14 2012 — edited Mar 16 2012
Hi,
Version 11202.
My standby db CONSISTENTLY has gap of one redo log file.

For example :

ON Primary:
========
SQL> select thread#, max(sequence#) "Last Primary Seq Generated" 
2 from v$archived_log val, v$database vdb
3 where val.resetlogs_change# = vdb.resetlogs_change#
4 group by thread# order by 1;

THREAD# Last Primary Seq Generated
---------- --------------------------
1 64
ON Standby:
======
SQL> select thread#, max(sequence#) "Last Standby Seq Received" 
2 from v$archived_log val, v$database vdb
3 where val.resetlogs_change# = vdb.resetlogs_change#
4 group by thread# order by 1;

THREAD# Last Standby Seq Received
---------- -------------------------
1 64

SQL> select thread#, max(sequence#) "Last Standby Seq Applied" 
2 from v$archived_log val, v$database vdb
3 where val.resetlogs_change# = vdb.resetlogs_change#
4 and val.applied='YES' 
5 group by thread# order by 1;

THREAD# Last Standby Seq Applied
---------- ------------------------
1 63
As you can see there is a gap of 1 redo log that didnt applied. Its in this state for few hours.

So, i am going to execute twice : alter system archive log current on primary :
SQL> alter system archive log current;

System altered.

SQL> alter system archive log current;

System altered.

SQL> select thread#, max(sequence#) "Last Primary Seq Generated" 
  2  from v$archived_log val, v$database vdb
  3  where val.resetlogs_change# = vdb.resetlogs_change#
  4  group by thread# order by 1;

   THREAD# Last Primary Seq Generated
---------- --------------------------
         1                         66
Now i will recheck if they were being applied on standby :
SQL> select thread#, max(sequence#) "Last Standby Seq Applied" 
  2  from v$archived_log val, v$database vdb
  3  where val.resetlogs_change# = vdb.resetlogs_change#
  4  and val.applied='YES' 
  5  group by thread# order by 1;

   THREAD# Last Standby Seq Applied
---------- ------------------------
         1                       65
As you can see , once again , i have a gap of one redo log. this time redolog number 66 did not applied .

Please advice
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2012
Added on Mar 14 2012
21 comments
8,102 views