conduktor.io ↗
← All errors
high SQL Server Setup

No maximum LSN recorded in the database; SQL Server Agent is not running

Root cause

SQL Server Agent must be running for CDC to advance LSNs. If the Agent is stopped, CDC scan jobs cannot run and Debezium finds no maximum LSN — this is fatal. On low-activity databases, no max LSN may also appear transiently if no CDC records exist yet; in that case, Debezium retries and it is not a failure.

How to fix

  1. Start SQL Server Agent: in SSMS → SQL Server Agent → Start, or: net start SQLSERVERAGENT
  2. Verify it is running:
    SELECT dss.status, dss.status_desc FROM sys.dm_server_services dss WHERE dss.servicename LIKE 'SQL Server Agent%';
  3. For low-activity databases: use heartbeat.action.query to generate periodic writes that keep CDC log entries alive.
  4. Monitor with:
    SELECT * FROM cdc.lsn_time_mapping ORDER BY tran_begin_time DESC;
Official Debezium documentation ↗