简体   繁体   English

成功创建 Always On SQL 服务器快照后,Debezium 未跟踪 CDC

[英]Debezium not tracking CDC after successful snapshot of Always On SQL Server

We have an Always On SQL Server instance.我们有一个 Always On SQL 服务器实例。 I want to track CDC events on some tables using Debezium.我想使用 Debezium 跟踪某些表上的 CDC 事件。 By following the official tutorials on debezium's website, I registered a connector with following properties:通过遵循 debezium 网站上的官方教程,我注册了一个具有以下属性的连接器:

{
    "name": "debezium-alwayson-connector",
    "config": {
        "connector.class": "io.debezium.connector.sqlserver.SqlServerConnector",
        "database.hostname": "<ip-address>",
        "database.port": "1433",
        "database.user": "<username>",
        "database.password": "<password>",
        "database.dbname": "<db_name>",
        "database.server.name": "<server_name>",
        "table.include.list": "dbo.<table_name>",
        "database.history.kafka.bootstrap.servers": "kafka:9092",
        "database.history.kafka.topic": "dbhistory.alwayson",
        "tombstones.on.delete":"false",
        "transforms":"Reroute",
        "transforms.Reroute.type":"io.debezium.transforms.ByLogicalTableRouter",
        "transforms.Reroute.topic.regex":"(.*)",
        "transforms.Reroute.topic.replacement":"cdc_landing.$1",
        "database.applicationIntent": "ReadOnly"
    }
}

The problem here is that, debezium successfully snapshots table to the related Kafka topic but does not track cdc events after snapshot.这里的问题是,debezium 成功地将表快照到相关的 Kafka 主题,但在快照后不跟踪 cdc 事件。 Does anyone have any idea?有人有什么主意吗?

By following Dude0001 's answer, we found out that we didn't have the privileges to execute that SQL command.按照Dude0001的回答,我们发现我们没有执行该 SQL 命令的权限。 For those who are having this kind of problem, please check that you have the correct privileges.对于遇到此类问题的人,请检查您是否拥有正确的权限。 Important Note: In debezium's source code it is stated that the referenced SQL command is not being used, but since we were using version 1.7, debezium was trying to execute that command and failed.重要说明:在 debezium 的源代码中,声明没有使用引用的 SQL 命令,但由于我们使用的是 1.7 版本,因此 debezium 试图执行该命令并失败。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM