4 Replies Latest reply: Nov 5, 2012 5:50 AM by DBA112 RSS

    Primary and Standby out of sync

    DBA112
      Dear Experts,

      I'm using *11.1.0.7 and real time apply*, I see logs not being applied on stand by site. I'm trying to understand where the gap is and how to resolve it (other than rebuilding standby). Thanks..
      PRIMARY:
       
      SQL>select thread#, max(sequence#) "Last Primary Seq Generated" from v$archived_log 
      where first_time between (sysdate-1) and (sysdate+1) group by thread# order by 1
      
         THREAD# Last Primary Seq Generated
      ---------- ------------------------------------
               2                        332
               3                        350
      
      
      SQL> SELECT MAX(SEQUENCE#), THREAD# FROM V$ARCHIVED_LOG GROUP BY THREAD#  order by THREAD#;
      
      MAX(SEQUENCE#)    THREAD#
      -------------- ----------
               40961          1
               50470          2
               51061          3
      
      
      
      STANDBY:
      
      SQL> select thread#, max(sequence#) "Last Standby Seq Receive"
      from v$archived_log
      group by thread# order by 1;  2    3
      
         THREAD# Last Standby Seq Receive
      ---------- ------------------------------------------
               2                    50481
               3                    51072
      
      
      
      select thread#, max(sequence#) "Last Standby Seq Applied"
      from v$archived_log where applied='YES'
      group by thread# order by 1;
      SQL>   2    3
      
         THREAD# Last Standby Seq Applied
      ---------- ------------------------
               2                    50480
               3                    51072
      
      
      MRP running fine:
      
      SQL> select process, thread#, sequence#, status from v$managed_standby where process='MRP0';
      
      PROCESS      THREAD#  SEQUENCE# STATUS
      --------- ---------- ---------- -----------------------------------
      MRP0               2      50482 APPLYING_LOG
      
      
      SQL> select count(*) from  V$ARCHIVED_LOG where applied <> 'YES';
      
        COUNT(*)
      ----------
           55288
      Edited by: Ora DBA on Oct 30, 2012 9:32 PM