3 Replies Latest reply: Aug 23, 2011 8:39 AM by mseberg RSS

    Archived redo logs and applied = IN-MEMORY

    AJ
      Hi all

      RAC primary with single-instance physical standby on version 11.2.0.2 using max performance with real time apply.

      I discovered some warnings doing my RMAN backups of my archived redo logs on the primary database (done every second hour):
      RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
      I've seen this before, but I noticed that the warning was for the same archived redo log file each time the backup ran, until a new log switch occured on the primary system.

      So I looked into v$archived_log at both sides:
      select thread#,sequence#,dest_id,to_char(first_time,'dd.mm hh24:mi') "first",to_char(next_time,'dd.mm hh24:mi') "next",to_char(completion_time,'dd.mm hh24:mi'), standby_dest,applied from v$archived_log where thread# = 1 and sequence# = 693 and dest_id = 2;
      
         THREAD#  SEQUENCE#    DEST_ID first       next        TO_CHAR(COM STA APPLIED
      ---------- ---------- ---------- ----------- ----------- ----------- --- ---------
               1        693          2 23.08 00:11 23.08 05:00 23.08 05:00 YES NO 
      Primary sees the sequence 693 as not applied. Why havent my Dataguard gap alarm sounded?

      So I check v$archived_log at standby side:
         THREAD#  SEQUENCE# first       next        TO_CHAR(COM REGISTR APPLIED   DEL
      ---------- ---------- ----------- ----------- ----------- ------- --------- ---
               1        693 23.08 00:11 23.08 05:00 23.08 05:00 RFS     IN-MEMORY NO
      And refering to the reference manual they state that
      If REGISTRAR = RFS and APPLIED = IN-MEMORY, then the log file has been applied in memory, but the datafiles have not yet been updated.
      This column can be used to identify log files that can be backed up and deleted. When used for this purpose, the value IN-MEMORY should be treated as if it were NO.
      Is this new behavior for 11g ? Is it a bug? Will the last log always have status "IN-MEMORY" ? I have the same thing for all my 11g standby databases and the status doesnt update to "APPLIED = YES" until a new log switch on primary.

      Anyone seen this?

      Any comment appricated :)
        • 1. Re: Archived redo logs and applied = IN-MEMORY
          mseberg
          There was a bug but not your version :

          V$Archived_log "Applied" column not updated For Downstream Capture [ID 602960.1]

          It looks more like this Oracle Note :

          RMAN deleting archive log(s) but file remains on disk [ID 1105372.1]

          If that does not work I would try to manually applied it.

          Best Regards

          mseberg
          • 2. Re: Archived redo logs and applied = IN-MEMORY
            AJ
            well, the log IS applied but according to the reference manual it's applied in memory and its changes has not been yet applied to the datafiles.
            what i see is that the changes remains in memory until a log switch occurs. then the status for applied changes to YES and the new log gets the "IN-MEMORY" status...
            • 3. Re: Archived redo logs and applied = IN-MEMORY
              mseberg
              So what I would do is this :

              On the Primary :

              alter system set log_archive_dest_state_2=defer;

              Then stop recovery on the Standby and shutdown the database.

              Startup mount and start recovery again and run you query again on that sequence.

              If it finally clears enable the primary again.


              alter system set log_archive_dest_state_2=enable;

              If not try to register it yourself.

              By chance does this show its waiting for a gap
              select process, status, sequence#, block# from v$managed_standby;
              Best Regards

              mseberg

              Edited by: mseberg on Aug 23, 2011 8:38 AM