-
Bug
-
Resolution: Done
-
Major
-
2.5.3.Final
-
None
-
False
-
None
-
False
-
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 2.4.3
What is the connector configuration?
Starting OracleConnectorTask with configuration:
connector.class = io.debezium.connector.oracle.OracleConnector
plugin.path =
schema.history.internal.file.filename = /var/mqsi/cdc/schemahistory.dat
topic.prefix = Main.FCMComposite_1_1
offset.storage.file.filename = /var/mqsi/cdc/offset.dat
errors.retry.delay.initial.ms = 300
value.converter = org.apache.kafka.connect.json.JsonConverter
key.converter = org.apache.kafka.connect.json.JsonConverter
publication.autocreate.mode = filtered
database.dbname = SE2
database.user = CDCUSER
offset.storage = org.apache.kafka.connect.storage.FileOffsetBackingStore
database.server.id = 1b6465b3-7801-42b3-b79b-33faa0027220
offset.flush.timeout.ms = 5000
errors.retry.delay.max.ms = 10000
database.port = 1521
plugin.name = pgoutput
offset.flush.interval.ms = 60000
schema.history.internal = io.debezium.storage.file.history.FileSchemaHistory
max.tasks = 1
errors.max.retries = -1
database.hostname = <redacted>
database.password = ********
name = engine
table.include.list = CDCUSER.CUSTOMERS
Note: there is no `database.pdb.name` there.
What is the captured database version and mode of depoyment?
On-prem, Oracle 19c
What behaviour do you expect?
Connection
What behaviour do you see?
2024-07-02 17:43:47.605 64 java.lang.RuntimeException: java.sql.SQLException: ORA-65090: operation only allowed in a container database
https://docs.oracle.com/error-help/db/ora-65090/
2024-07-02 17:43:47.605 64 at io.debezium.connector.oracle.OracleConnection.setSessionToPdb(OracleConnection.java:111)
2024-07-02 17:43:47.605 64 at io.debezium.connector.oracle.OracleSnapshotChangeEventSource.prepare(OracleSnapshotChangeEventSource.java:100)
2024-07-02 17:43:47.605 64 at io.debezium.connector.oracle.OracleSnapshotChangeEventSource.prepare(OracleSnapshotChangeEventSource.java:44)
2024-07-02 17:43:47.605 64 at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:71)
2024-07-02 17:43:47.605 64 at io.debezium.pipeline.ChangeEventSourceCoordinator.doSnapshot(ChangeEventSourceCoordinator.java:250)
2024-07-02 17:43:47.605 64 at io.debezium.pipeline.ChangeEventSourceCoordinator.doSnapshot(ChangeEventSourceCoordinator.java:234)
2024-07-02 17:43:47.605 64 at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:186)
2024-07-02 17:43:47.605 64 at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:137)
2024-07-02 17:43:47.605 64 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
2024-07-02 17:43:47.605 64 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2024-07-02 17:43:47.606 64 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2024-07-02 17:43:47.606 64 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2024-07-02 17:43:47.606 64 at java.base/java.lang.Thread.run(Thread.java:839)
2024-07-02 17:43:47.606 64 Caused by: java.sql.SQLException: ORA-65090: operation only allowed in a container database
https://docs.oracle.com/error-help/db/ora-65090/
2024-07-02 17:43:47.606 64 at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:702)
2024-07-02 17:43:47.606 64 at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:608)
2024-07-02 17:43:47.606 64 at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1277)
2024-07-02 17:43:47.606 64 at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:1102)
2024-07-02 17:43:47.606 64 at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:456)
2024-07-02 17:43:47.606 64 at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:482)
2024-07-02 17:43:47.606 64 at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:170)
2024-07-02 17:43:47.606 64 at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1117)
2024-07-02 17:43:47.607 64 at oracle.jdbc.driver.OracleStatement.executeSQLStatement(OracleStatement.java:1652)
2024-07-02 17:43:47.607 64 at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1417)
2024-07-02 17:43:47.607 64 at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:2278)
2024-07-02 17:43:47.607 64 at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:2227)
2024-07-02 17:43:47.607 64 at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:330)
2024-07-02 17:43:47.607 64 at io.debezium.connector.oracle.OracleConnection.setSessionToPdb(OracleConnection.java:108)
2024-07-02 17:43:47.607 64 ... 12 more
2024-07-02 17:43:47.607 64 Caused by: Error : 65090, Position : 27, SQL = alter session set container=null, Original SQL = alter session set container=null, Error Message = ORA-65090: operation only allowed in a container database
2024-07-02 17:43:47.607 64 at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:710)
2024-07-02 17:43:47.607 64 ... 25 more
Do you see the same behaviour using the latest released Debezium version?
I don't know, sorry!
Do you have the connector logs, ideally from start till finish?
(You might be asked later to provide DEBUG/TRACE level log)
Yes, but they're from a customer so would need to redact if needed.
How to reproduce the issue using our tutorial deployment?
Tutorial uses CDB database, so doesn't exhibit problem
Do you have a fix?
yes, to `debezium-connector-oracle/src/main/java/io/debezium/connector/oracle/OracleSnapshotChangeEventSource.java` and `debezium-connector-oracle/src/test/java/io/debezium/connector/oracle/util/TestHelper.java`. To do
```
- if (connectorConfig.getPdbName() != null) {
+ if (!Strings.isNullOrBlank(connectorConfig.getPdbName())) {
```
- links to
-
RHEA-2024:139598 Red Hat build of Debezium 2.5.4 release