2 Replies Latest reply: Mar 21, 2013 8:05 AM by 896971 RSS

    data guard question

    933651
      Hello everyone!
      I have configured oracle active data guard on linux servers.
      Everything looks fine, logs are shipped and applied, but the thing that looks weird to me is that when I query max(sequence#) and max(sequence#) where applied='YES' the second query result is always 1 log behind the the first query result.
      This happened after upgrading to 11.2.0.3.
      Before I had 11.2.0.1
      I don't know if this has to be considered a problem?

      It is configured for maximum performance and real time apply.
        • 1. Re: data guard question
          mseberg
          Hello;

          With "real time apply" on 11.2.0.3 I get the same results. If I don't use "real time apply" it does not show 1 log behind. So with "Real Time Apply" I expect it shows only fully completed logs which makes sense. A log in progress if you will.

          h2. Test

          Without real time apply
          Connected to:
          Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
          With the Partitioning, OLAP, Data Mining and Real Application Testing options
          
          SQL> set linesize 100
          SQL> column STANDBY format a20
          SQL> column applied format a10
          SQL> SELECT  name as STANDBY, SEQUENCE#, applied, completion_time from v$archived_log WHERE  DEST_ID = 2 AND NEXT_TIME > SYSDATE -1;
          
          STANDBY               SEQUENCE# APPLIED    COMPLETIO
          -------------------- ---------- ---------- ---------
          STANDBY                     221 YES        20-MAR-13
          STANDBY                     222 YES        20-MAR-13
          STANDBY                     223 YES        20-MAR-13
          STANDBY                     224 YES        20-MAR-13
          STANDBY                     225 YES        20-MAR-13
          STANDBY                     226 YES        20-MAR-13
          STANDBY                     227 YES        20-MAR-13
          STANDBY                     228 YES        20-MAR-13
          STANDBY                     229 YES        20-MAR-13
          STANDBY                     230 YES        20-MAR-13
          STANDBY                     231 YES        21-MAR-13
          
          11 rows selected.
          Stop apply and retart apply
          Connected to:
          Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
          With the Partitioning, OLAP, Data Mining and Real Application Testing options
          
          SQL> alter database recover managed standby database cancel;   
          
          Database altered.
          
          SQL> alter database recover managed standby database using current logfile disconnect from session;
          
          Database altered.
          
          SQL> 
          With real time apply ( after several minutes )

          SQL> SELECT  name as STANDBY, SEQUENCE#, applied, completion_time from v$archived_log WHERE  DEST_ID = 2 AND NEXT_TIME > SYSDATE -1;
          
          STANDBY               SEQUENCE# APPLIED    COMPLETIO
          -------------------- ---------- ---------- ---------
          STANDBY                     221 YES        20-MAR-13
          STANDBY                     222 YES        20-MAR-13
          STANDBY                     223 YES        20-MAR-13
          STANDBY                     224 YES        20-MAR-13
          STANDBY                     225 YES        20-MAR-13
          STANDBY                     226 YES        20-MAR-13
          STANDBY                     227 YES        20-MAR-13
          STANDBY                     228 YES        20-MAR-13
          STANDBY                     229 YES        20-MAR-13
          STANDBY                     230 YES        20-MAR-13
          STANDBY                     231 YES        21-MAR-13
          
          STANDBY               SEQUENCE# APPLIED    COMPLETIO
          -------------------- ---------- ---------- ---------
          STANDBY                     232 NO         21-MAR-13
          
          12 rows selected.
          After 5 minutes
          STANDBY               SEQUENCE# APPLIED    COMPLETIO
          -------------------- ---------- ---------- ---------
          STANDBY                     232 NO         21-MAR-13
          
          12 rows selected.
          Best Regards

          mseberg

          Edited by: mseberg on Mar 21, 2013 5:15 AM
          • 2. Re: data guard question
            896971
            I was curious about this myself, thanks for your post mseberg!