You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "ccoffline (via GitHub)" <gi...@apache.org> on 2026/02/24 07:46:48 UTC

[I] [Bug] Oracle-CDC does not support read-only ADG database [seatunnel]

ccoffline opened a new issue, #10508:
URL: https://github.com/apache/seatunnel/issues/10508

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
   
   
   ### What happened
   
   I have 2 oracle database: primary and ADG read-only. I need to get CDC from read-only db. Oracle-CDC seatunnel connector start mining session which will cause `ORA-01300: writable database required for specified LogMiner options`.
   
   ### SeaTunnel Version
   
   2.3.12
   
   ### SeaTunnel Config
   
   ```conf
   env {
     parallelism = 2
     job.mode = "STREAMING"
     checkpoint.interval = 10000
   }
   
   source {
     Oracle-CDC {
       plugin_output = "customers"
       source.reader.close.timeout = 120000
   
       skip_analyze = true
       debezium.log.mining.transaction.snapshot.boundary.mode = "transaction_view_only"
       # debezium.log.mining.strategy = "redo_log_catalog"
     }
   }
   
   sink {
     Doris {
   
       doris.config = {
         format = "json"
         read_json_by_line = "true"
       }
     }
   }
   ```
   
   ### Running Command
   
   ```shell
   docker exec -it seatunnel /opt/seatunnel/bin/seatunnel.sh --config /opt/seatunnel/jobs/oracle2doris.conf --name oracle2doris
   ```
   
   ### Error Exception
   
   ```log
   Caused by: java.sql.SQLException: ORA-01300: writable database required for specified LogMiner options
   ORA-06512: at "SYS.DBMS_LOGMNR", line 58
   ORA-06512: at line 1
   
   	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
   	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)
   	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054)
   	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623)
   	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
   	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
   	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:213)
   	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:37)
   	at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:896)
   	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1119)
   	at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1737)
   	at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1692)
   	at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:300)
   	at io.debezium.jdbc.JdbcConnection.executeWithoutCommitting(JdbcConnection.java:1446)
   	at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.startMiningSession(LogMinerStreamingChangeEventSource.java:682)
   	at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:250)
   	... 8 more
   Caused by: Error : 1300, Position : 0, Sql = BEGIN sys.dbms_logmnr.start_logmnr(startScn => '171613417951', endScn => '171613437950', OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG  + DBMS_LOGMNR.NO_ROWID_IN_STMT);END;, OriginalSql = BEGIN sys.dbms_logmnr.start_logmnr(startScn => '171613417951', endScn => '171613437950', OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG  + DBMS_LOGMNR.NO_ROWID_IN_STMT);END;, Error Msg = ORA-01300: writable database required for specified LogMiner options
   ORA-06512: at "SYS.DBMS_LOGMNR", line 58
   ORA-06512: at line 1
   
   	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
   	... 23 more
   ```
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Oracle-CDC does not support read-only ADG database [seatunnel]

Posted by "DanielCarter-stack (via GitHub)" <gi...@apache.org>.
DanielCarter-stack commented on issue #10508:
URL: https://github.com/apache/seatunnel/issues/10508#issuecomment-3950051607

   <!-- code-pr-reviewer -->
   Thanks for reporting this and willingness to contribute. After analyzing the codebase, this is a confirmed limitation—not just a configuration gap.
   
   **Root cause**: LogMiner session startup is hardcoded with `DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG` (see `LogMinerAdapter.java:298-307`), which requires write permissions and throws `ORA-01300` on read-only ADG. Additionally, `DBMS_LOGMNR_D.BUILD` (line `LogMinerStreamingChangeEventSource.java:514-518`) cannot execute on read-only databases.
   
   The existing `log.mining.read.only` config (`OracleSourceConfigFactory.java:110`) only controls `LogWriterFlushStrategy` to skip LGWR flush—it does **not** override LogMiner startup options. Similarly, `transaction_view_only` only affects transaction boundary queries.
   
   **Oracle CDC via LogMiner is architecturally designed to connect to a writable primary database**, not a read-only standby. This is an upstream Debezium Oracle Connector constraint.
   
   **Workarounds**:
   1. Connect Oracle-CDC to the primary database instead of ADG standby
   2. Consider Oracle XStream or GoldenGate as alternative CDC sources (requires additional licensing)
   3. Use SeaTunnel JDBC connector with scheduled polling from the standby (non-real-time)
   
   If you'd like to pursue a PR, the fix would need to either (a) use `DICT_FROM_REDO_LOGS` instead of `DICT_FROM_ONLINE_CATALOG` when in read-only mode, or (b) add configuration to override LogMiner startup options. I recommend checking Debezium community for existing ADG support first.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Oracle-CDC does not support read-only ADG database [seatunnel]

Posted by "cantfu (via GitHub)" <gi...@apache.org>.
cantfu commented on issue #10508:
URL: https://github.com/apache/seatunnel/issues/10508#issuecomment-6406909744

   Hi @ccoffline @DanielCarter-stack , any new solution there? Or any plan to fix this bug?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Oracle-CDC does not support read-only ADG database [seatunnel]

Posted by "cantfu (via GitHub)" <gi...@apache.org>.
cantfu commented on issue #10508:
URL: https://github.com/apache/seatunnel/issues/10508#issuecomment-6411693227

   > 4\. Hi [@ccoffline](https://github.com/ccoffline) [@DanielCarter-stack](https://github.com/DanielCarter-stack) , any new solution there? Or any plan to fix this bug?
   
   Any plan to upgrade debezium version? It seems like debezium community support ADG, `log.mining.strategy=dictionary_from_file `https://debezium.io/documentation/reference/stable/connectors/oracle.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Oracle-CDC does not support read-only ADG database [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10508:
URL: https://github.com/apache/seatunnel/issues/10508#issuecomment-6415640292

   Thanks for checking the newer Debezium documentation. You are right that my earlier blanket statement about upstream standby support is outdated: current Debezium documents physical-standby capture as an incubating feature, with the primary used for snapshots/metadata and the standby used for LogMiner streaming. It requires a flat-file dictionary and `dictionary_from_file` (among other settings). Debezium 1.9's documentation, by contrast, says standby capture is unsupported. See https://debezium.io/documentation/reference/stable/connectors/oracle.html and https://debezium.io/documentation/reference/1.9/connectors/oracle.html.
   
   SeaTunnel 2.3.12 and current `dev` still pin `debezium-connector-oracle` to `1.9.8.Final`. SeaTunnel also carries Oracle LogMiner code: `LogMinerAdapter.startSession()` explicitly uses `DICT_FROM_ONLINE_CATALOG`, and `LogMinerStreamingChangeEventSource` calls `DBMS_LOGMNR_D.BUILD`. The existing `log.mining.read.only` setting only addresses the flush behavior; changing the transaction snapshot boundary or adding `dictionary_from_file` to the 2.3.12 config does not replace those paths. I found no open SeaTunnel PR implementing the newer physical-standby mode, so there is no verified upgrade/support date to give.
   
   For a scoped contribution, please confirm the Oracle version and whether this is a physical or logical ADG standby, whether a primary connection is available for snapshots/metadata, and whether the standby can access a dictionary file exported from the primary (redact hosts and credentials). The design/PR then needs to cover the Debezium upgrade plus SeaTunnel's overrides, primary/standby connection routing, schema-history and checkpoint behavior, and a real primary-to-ADG restore test. A dependency-only bump would not establish support. I marked this as `help wanted` for that focused design and validation work.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org