Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-3341

Do not mine Data Guard archive log entries

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.5.0.Final
    • 1.5.0.CR1
    • oracle-connector
    • None

    Description

      When an Oracle environment is using Data Guard, there will be additional rows written to the V$ARCHIVED_LOG table that must be excluded to avoid the exception:

      java.sql.SQLException: ORA-01284: file xxxx cannot be opened
      ORA-00308: cannot open archive log 'xxxx'
      ORA-27037: unable to obtain file status
      ORA-06512: at "SYS.DBMS_LOGMNR", line 68
      ORA-06512: at line 1
      

      In 1.5.0.Beta2, we changed the log picking process to prefer archive logs over redo logs if the same SCN range was found because this avoids the concern with missing logfile during the mining session; however this subsequently led to this problem.

      In V$ARCHIVED_LOG, there are multiple rows for the same SCN range. In fact, there is one row where STANDBY_DEST='NO' and another where the same column is YES. We need to filter these results by some predicate to avoid picking the wrong entries here that cannot be mined by LogMiner.

      Solution 1: Use predicate DEST_ID IN (SELECT DEST_ID FROM V$ARCHIVE_DEST_STATUS WHERE STATUS = 'VALID' AND TYPE = 'LOCAL')
      Solution 2: Use predicate STANDBY='NO'

      Attachments

        1. dbz-3341-1.png
          dbz-3341-1.png
          164 kB
        2. dbz-3341-2.png
          dbz-3341-2.png
          75 kB
        3. dbz-3341-3.png
          dbz-3341-3.png
          82 kB

        Activity

          People

            ccranfor@redhat.com Chris Cranford
            ccranfor@redhat.com Chris Cranford
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: