gpt4 book ai didi

oracle - Debezium-oracle-connect, kafka 连接 ORA-01031

转载 作者:行者123 更新时间:2023-12-05 07:15:13 26 4
gpt4 key购买 nike

我按照官方文档创建了kafka connect。Kafka2.4Debezium 1.0 Final

{
"name": "oracle-connect",
"config": {
"connector.class" : "io.debezium.connector.oracle.OracleConnector",
"tasks.max" : "1",
"database.server.name" : "orcl",
"database.hostname" : "xx.xxx.xx.xx",
"database.port" : "1521",
"database.user" : "c##xstrm",
"database.password" : "xs",
"database.dbname" : "orcl",
"database.pdb.name" : "pdborcl",
"database.out.server.name" : "dbzxout",
"database.history.kafka.bootstrap.servers" : "kafka:9092",
"database.history.kafka.topic": "schema-changes.inventory"
}}

但是,抛出异常:

ERROR Failed to initialize snapshot context. (io.debezium.relational.RelationalSnapshotChangeEventSource:107)
java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges
at io.debezium.connector.oacle.OracleConnection.setSessionToPdb(OracleConnection.java:51)
......
Caused by: java.sql.SQLSyntaxErrorException:ORA-01031: insufficient privileges
at oracle.jdbc.driver.T2CConnection.checkError(T2CConection.java:1002)
.....
ERROR Producer failure (io.debezium.pipeline.ErrorHandler:36)
...........ORA-01031: insufficient privileges.

一开始感觉是oracle用户权限的问题。所以 windows cmd 连接 Oracle。顺便说一句 我的 oracle 版本 12c

sqlplus / as sysdba

grant connect, resource, dba to c##xstrm;

但还是异常,问题多半出现在Oracle中,但不知如何解决

最佳答案

看起来像是授权问题。快速查看文档会列出所需的权限。

GRANT CREATE SESSION TO c##xstrm CONTAINER=ALL;

GRANT SET CONTAINER TO c##xstrm CONTAINER=ALL;

GRANT SELECT ON V_$DATABASE to c##xstrm CONTAINER=ALL;

GRANT FLASHBACK ANY TABLE TO c##xstrm CONTAINER=ALL;

详细说明:https://debezium.io/documentation/reference/connectors/oracle.html#_creating_an_xstream_admin_user_and_a_user_for_the_connector

关于oracle - Debezium-oracle-connect, kafka 连接 ORA-01031,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59640674/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com