Sitemap
DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest development in the field.

Member-only story

Working with CDC and Debezium Inside SQL Server

6 min readAug 4, 2026

--

Press enter or click to view image in full size
Source: Author

Not a medium member? Read here!

Today I want to focus only between SQL CDC and Debezium connection. My goal is to dive deeper on how things connect in the SQL Server side.

Same billing.dbo.order_details table, same lab. If it is up from last time, you are ready. If not, docker compose up -d in this folder gets you there.

What sp_cdc_enable_db Actually Built

sp_cdc_enable_db creates a cdc schema in the database and starts two SQL Server Agent jobs.

Look at msdb:

SELECT [name], [enabled]
FROM msdb.dbo.sysjobs
WHERE [name] LIKE 'cdc.billing_%';

Two jobs with two responsibilities:

  • cdc.billing_capture reads the transaction log and writes rows into the change tables. This jobs is responsible for taking the transaction commited to a queryable row inside the cdc table. It runs continuosuly.
  • cdc.billing_cleanup deletes change table rows older than the retention window. The default is 4320 minutes (03 days), but you can change and configure.

Both are adjusted using the same procedure:

EXEC sys.sp_cdc_change_job @job_type = 'capture', @pollinginterval = 2; -- seconds
EXEC sys.sp_cdc_change_job…

--

--

DevOps.dev
DevOps.dev

Published in DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest development in the field.