827086469 commented on issue #8463:
URL: https://github.com/apache/seatunnel/issues/8463#issuecomment-2782271823

   > 因为我身边无使用CDB+PDB模式的数据库实例,无法验证你的问题。 根据我的理解你可以尝试一个修改点: 
把表名前缀的database名改为:CDB的名称:ORA19C (需为大写) 原因是:在源码中获取database列表的查询语句为:
   > 
   >     @Override
   >     protected String getListDatabaseSql() {
   >         return "SELECT name FROM v$database";
   >     }
   > 该查询只会得到 CDB名称。
   > 
   > 同时连接数据库的 base-url 把'/' 改为':'
   > 
   > base-url = "jdbc:oracle:thin:@//10.0.6.53:1521:ora19c"
   > 原因是源码中在拼接连接串时,会自动拼接/:
   > 
   >     protected String getUrlFromDatabaseName(String databaseName) {
   >         String url = baseUrl.endsWith("/") ? baseUrl : baseUrl + "/";
   >         return url + databaseName + suffix;
   >     }
   > 错误可能和这里有关。
   > 
   > 配置项:
   > 
   > ```
   > source {
   >   Oracle-CDC {
   >     driver = "oracle.jdbc.driver.OracleDriver"
   >     base-url = "jdbc:oracle:thin:@//10.0.6.53:1521:ora19c"  # 此处不区分大小写
   >     username = "c##logminer"
   >     password = "logminer"
   >     database-names = ["PDB1"]           # 监控的 db 列表 
   >     schema-names = ["PROVINCE_LNJY"]    # 监控的 schema 列表
   >     table-names = ["ORA19C.PROVINCE_LNJY.MY_OBJECTS"] # 监控的 table 
列表,需含库名前缀,使用CDB名称
   >     use_select_count = true
   >     result_table_name = "customers"
   >     source.reader.close.timeout = 120000
   >     connection.pool.size = 1
   >     schema-changes.enabled = true       # 启用 schema evolution 功能 
   >   }
   > }
   > ```
   
   非CDB环境的你解决了吗,我目前19C非CDB环境会报operation only allowed in a container 
database,意思是这要在CDB环境运行,不清楚非CDB环境该怎么配置了


-- 
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-unsubscr...@seatunnel.apache.org

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

Reply via email to