-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
None
-
None
-
False
-
False
-
Undefined
-
Hi ccranfor@redhat.com, we have encountered the invalid SCN range exception many times. We added more logs and we found that the end SCN is finally smaller than the start SCN. here is the exception and SCN values
[2021-06-07 20:32:17,336] INFO getEndScn: currentScn 17480638141152 ->topScnToMine: 17480608978293 topMiningScnInFarFuture: false (io.debezium.connector.oracle.logminer.LogMinerHelper:154) [2021-06-07 20:32:17,343] INFO Updating LOG_MINING_FLUSH with SCN 17480638141156 (io.debezium.connector.oracle.logminer.LogMinerHelper:176) [2021-06-07 20:32:17,370] INFO log mining miningStartScn=17480608988183, endScn=17480608978293, scnJump=-9890 , offsetContext scn : 17480608888293, offsetContext commit scn : 17480608988183 startScn: 17480608888293 (io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource:178) [2021-06-07 20:32:17,380] ERROR Mining session stopped due to the {} (io.debezium.connector.oracle.logminer.LogMinerHelper:493) java.sql.SQLException: ORA-01281: SCN range specified is invalid ORA-06512: at "SYS.DBMS_LOGMNR", line 72 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.T4CCallableStatement.doOall8(T4CCallableStatement.java:223) at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:56) at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:907) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1119) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3780) at oracle.jdbc.driver.T4CCallableStatement.executeInternal(T4CCallableStatement.java:1300) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3887) at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4230) at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1079) at io.debezium.connector.oracle.logminer.LogMinerHelper.executeCallableStatement(LogMinerHelper.java:669) at io.debezium.connector.oracle.logminer.LogMinerHelper.startLogMining(LogMinerHelper.java:221) at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:181)
From the source, we are a bit confused about 2 start SCN(start SCN and miningStartScn), startSCN is used to calculate EndSCN
miningStartScn is used to start the miningSession
startSCN is again used for query range.
We sometimes found the miningStartSCN would be smaller then the startSCN, that means the start miningSession SCN range is not in the range of query miningSession range?
My coworker infinitesnowboy and I have tried an experiment to use only one start SCN, and it works fine, and we no longer see this exception for almost 1 week.
we will post a PR.
- duplicates
-
DBZ-3627 ORA-01281: SCN range specified is invalid
- Closed