Debezium SQL Server Connector

The Debezium’s SQL Server Connector is a source connector that can obtain a snapshot of the existing data in a SQL Server database and then monitor and record all subsequent row-level changes to that data. All of the events for each table are recorded in a separate Apache Kafka® topic, where they can be easily consumed by applications and services.

  • Confluent supports Debezium SQL Server connector version 0.9.3 and later.
  • Confluent supports using this connector with SQL Server 2016 SP1 or later.
  • SQL Server on Microsoft Azure is currently not supported.

Install the SQL Server Connector

You can install this connector by using the Confluent Hub client (recommended) or you can manually download the ZIP file.

confluent-hub install debezium/debezium-connector-sqlserver:latest

You can install a specific version by replacing latest with a version number. For example:

confluent-hub install debezium/debezium-connector-sqlserver:0.9.4

Configure Change Data Capture on SQL Server

The SQL Server database (SQL Server 2016 SP1 or later versions) must be configured to enable the Change Data Capture (CDC) feature. The connect requires this feature be enabled for the table(s) that should be captured by the Debezium connector. The functionality of the connector is based upon this CDC feature included in the SQL Server Standard and SQL Server Enterprise editions.

To enable CDC on the monitored database, use the following SQL command:

USE MyDB
GO
EXEC sys.sp_cdc_enable_db
GO

Enable CDC for each table that you plan to monitor:

USE MyDB
GO
EXEC sys.sp_cdc_enable_table @source_schema = N’dbo’, @source_name = N’MyTable’, @role_name = N’MyRole’, @filegroup_name = N’MyDB_CT’, @supports_net_changes = 1
GO

License

The Debezium SQL Server connector is an open source connector and does not require a Confluent Enterprise License.

Documentation

Note

Portions of the information provided here derives from documentation originally produced by the Debezium Community. Work produced by Debezium is licensed under Creative Commons 3.0.