flink-cdc icon indicating copy to clipboard operation
flink-cdc copied to clipboard

FlinkCDC Oracle TableName Question

Open rekichan opened this issue 5 years ago • 2 comments

Dear developer: I have used FlinkCDC to catch oracle achrive log and met an exception from SqlUtils.class:"Supplemental logging not configured for table XXXX.xxxx. User command ALTER TABLE XXXX.XXXX ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS". My oracle SchemaName and TableName is upper case, but when my application is running and it will changed the TableName to lower case,that will cause the SQL "SELECT 'KEY', LOG_GROUP_TYPE FROM %s WHERE OWNER = '%s' AND TABLE_NAME = '%s'" can't show anything result. Because of the TableName in Oracle System Table is upper case,SO it will throw the exception. Pls tell me how to deal with this problem?Thx! 尊敬的开发者你好: 我在使用FlinkCDC读取Oracle归档日志的初始触发了SqlUtils.class类中的错误:"Supplemental logging not configured for table XXXX.xxxx. User command ALTER TABLE XXXX.XXXX ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS" 我的Oracle Schema名及Table名是大写的,但运行了程序之后在检测SupplementalLogging的时候Table名会变成小写,导致SQL "SELECT 'KEY', LOG_GROUP_TYPE FROM %s WHERE OWNER = '%s' AND TABLE_NAME = '%s'"找不到指定的表。 因为Oracle中系统表的内容是大写的,所以会抛出该异常。 请告诉我如何解决该问题?谢谢!

rekichan avatar Nov 30 '21 09:11 rekichan

For Oracle version 11, debezium will set tableidcasesensitive to true by default, resulting in the table name being updated to lowercase. Therefore, the table completion log setting cannot be queried in Oracle, resulting in the false alarm of "supplementary logging not configured for table error".

If it is the datastream API, add the configuration item of debezium 'database.tablename.case.insensitive' = 'false'. If the SQL method is used, add the configuration item 'debezium.database.tablename.case.insensitive' = 'false' in the option of the table

对于 oracle11 版本,debezium 会默认把 tableIdCaseInsensitive 设置为true, 导致表名被更新为小写,因此在oracle中查询不到 这个表补全日志设置,导致误报这个Supplemental logging not configured for table 错误”。 添加 debezium 的配置项 'database.tablename.case.insensitive' = 'false', 如果使用 SQL 的方式,则在表的 option 中添加配置项 'debezium.database.tablename.case.insensitive' = 'false'

gtk96 avatar Nov 30 '21 09:11 gtk96

For Oracle version 11, debezium will set tableidcasesensitive to true by default, resulting in the table name being updated to lowercase. Therefore, the table completion log setting cannot be queried in Oracle, resulting in the false alarm of "supplementary logging not configured for table error".

If it is the datastream API, add the configuration item of debezium 'database.tablename.case.insensitive' = 'false'. If the SQL method is used, add the configuration item 'debezium.database.tablename.case.insensitive' = 'false' in the option of the table

对于 oracle11 版本,debezium 会默认把 tableIdCaseInsensitive 设置为true, 导致表名被更新为小写,因此在oracle中查询不到 这个表补全日志设置,导致误报这个Supplemental logging not configured for table 错误”。 添加 debezium 的配置项 'database.tablename.case.insensitive' = 'false', 如果使用 SQL 的方式,则在表的 option 中添加配置项 'debezium.database.tablename.case.insensitive' = 'false'

thanks for your answer and wish you happiness! 谢谢你的提示!

rekichan avatar Nov 30 '21 11:11 rekichan