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

ReselectColumnPostProcessor can throw ORA-01003 "no statement parsed" when using fallback non-flashback area query

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.5.Final
    • 3.0.4.Final
    • oracle-connector
    • None

      The ReselectColumnPostProcessor relies on the Flashback Area to capture the column state for a change vector, but if the SCN when the change occurred has since aged from the undo retention and flashback area, the connection will use a fallback query to fetch the data out of bands.

      The problem is when the connection uses a PDB, the first call to the reselect helper method shifts the connection into the pluggable database; however, upon the error, it calls the same method again, attempting to re-execute

      ALTER SESSION SET CONTAINER=<pdb_name>
      

      This results in the ORA-01003 error as the session is already in the PDB.

      We should sanity check the `setsSessionToPdb` method by first querying the current container state before attempting to ALTER, optionally logging a warning/debug message when we're already in the PDB, i.e.:

      SELECT SYS_CONTEXT('USERENV','CON_NAME') FROM DUAL
      

      If the result of this query matches the PDB name, we skip the ALTER.

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

                Created:
                Updated:
                Resolved: