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

ORA-65040 occurs on log switches when log.mining.restart.connection is enabled and connection defaults to PDB rather than CDB$ROOT

XMLWordPrintable

    • Important

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      Oracle Connector for Debezium, version 2.7.4.Final

       

      What is the connector configuration?

      The configuration included the parameter:
      log.mining.restart.connection=true

      What is the captured database version and mode of deployment?

      Oracle RAC Exacc, 19C, on-premises

      What behavior do you expect?

      When the connection is dropped and re-opened (e.g., during a log switch), the connector should seamlessly return to the correct CDB$ROOT/PDB context it was in prior to the disconnection.

      What behavior do you see?

      When the log.mining.restart.connection parameter was set, every time there was a log switch, the error ORA-65040: operation not allowed from within a pluggable database occurred.

      Do you see the same behaviour using the latest released Debezium version?

      The issue occurs with Debezium version 2.7.4.Final. It has not been tested with newer Alpha/Beta/CR versions.

      Do you have the connector logs, ideally from start till finish?

      The TRACE message right before the error occurs is as follows:

      TRACE [debezium-oracleconnector-01931036-0882-1553-3bd4-358060e0273c-change-event-source-coordinator] i.d.c.o.l.LogMinerStreamingChangeEventSource Adding log file +RECOC1/SATPTRXS/ARCHIVELOG/2025_01_14/thread_4_seq_12597.43444.1190383205 to the mining session.

      2025-01-14 14:00:06,256 ERROR [debezium-oracleconnector-01931036-0882-1553-3bd4-358060e0273c-change-event-source-coordinator] io.debezium.pipeline.ErrorHandler Producer failure java.sql.SQLException: ORA-65040: operation not allowed from within a pluggable database ORA-06512: at "SYS.DBMS_LOGMNR", line 82 ORA-06512: at line 1 at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:630) at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:564) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1151) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:771) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:299) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:498) at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:148) at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1048) at oracle.jdbc.driver.OracleStatement.executeSQLStatement(OracleStatement.java:1531) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1311) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3746) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3941) at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4279) at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1010) at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.initializeRedoLogsForMining(LogMinerStreamingChangeEventSource.java:404) at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:231) at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:62) at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:313) at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:203) at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:143) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) - Caused by: Error : 64040, Position : 0, Sql = BEGIN sys.dbms_logmnr.add_logfile(LOGFILENAME => '+RECOC1/SATPTRXS/ARCHIVELOG/2025_01_14/thread_4_seq_12597.43444.1190383205', OPTIONS => DBMS_LOGMNR.ADDFILE);end;

      How to reproduce the issue using our tutorial deployment?

      • Use the Oracle Connector for Debezium (version 2.7.4.Final) with the log.mining.restart.connection=true parameter in the configuration.
      • Capture changes in an Oracle database using log mining.
      • Trigger a log switch in the Oracle database.
      • Observe the connector's behavior and note the ORA-65040 error.

      If possible, I would like the update with the fix to be released in a 2.7.x version, since the 3.x connector uses a different Java version.
       
       

              ccranfor@redhat.com Chris Cranford
              getecsef Gerencia de Tecnologia da Informacao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: