3 Replies Latest reply on Oct 8, 2013 12:50 PM by mseberg

    Dataguard GAP showing in Minus(-)

    978865

      hi there,

      we have just migrated from oracle 9.2.0.3.0 to 11.2.3.0 on IBM - AIX

       

      DR also have been migrated from 9.2.0.3.0 to 11.2.3.0.

       

       

      previously we used to check for the DR GAP count with the help of below query on 9i.

       

      {code}

      SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#) "Difference"

      FROM

      (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,

      (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL

      WHERE

      ARCH.THREAD# = APPL.THREAD#

      ORDER BY 1;

       

      {code}

       

       

      {code}

      Thread Last Sequence Received Last Sequence Applied Difference

      ---------- ---------------------- --------------------- ----------

           1             403280            404811  -1531

      {code}

       

       

      so why its showing the difference in Minus.

      MRP process is down when there was  a GAP of 7000 logs. and some 1000 logs have been copied manually. and below command have been fired on DR site

       

      {code}

      alter database recover standby database

      {code}

      so friends what is the issue here. need help.

        • 1. Re: Dataguard GAP showing in Minus(-)
          mseberg

          Hello;

           

          I ran your query on my test system and it worked fine there:

           

          Thread Last Sequence Received Last Sequence Applied Difference

          ---------- ---------------------- --------------------- ----------

            1                954                954                0

           

          I might compare the SCN of the two databases:

           

          SELECT CURRENT_SCN FROM V$DATABASE ;

           

           

          Assuming they are close I would try this query to see if I had a gap:

           

          http://www.visi.com/~mseberg/data_guard/monitor_data_guard_transport.html_

           

          Sometimes I have seen a minus when the Standby has been recreated.

           

          Best Regards

           

          mseberg

          • 2. Re: Dataguard GAP showing in Minus(-)
            978865

            hi,

             

            {code}

            Sometimes I have seen a minus when the Standby has been recreated.

            {/code}

             

            but what  is the reason of showing in minus.

             

            thanks

            • 3. Re: Dataguard GAP showing in Minus(-)
              mseberg

              V$LOG_HISTORY displays log history information from the control file.

               

              V$LOG_HISTORY is obsolete and retained for backwards compatibility only.

               

               

              V$ARCHIVED_LOG displays archived log information from the control file, including archive log names. An archive log record is inserted after the online redo log is successfully archived or cleared (name column is NULL if the log was cleared). If the log is archived twice, there will be two archived log records with the same THREAD#, SEQUENCE#, and FIRST_CHANGE#, but with a different name. An archive log record is also inserted when an archive log is restored from a backup set or a copy and whenever a copy of a log is made with the RMAN COPY command.

               

               

               

               

               

              Best Regards

               

               

               

              mseberg

              1 person found this helpful