When mssql CDC table are static, the server eventually shuts off its internal transaction logs agent.
When we attempt to CDC read from the server, debezium fails to connect with "Cannot query the status of the SQL Server Agent":
2026-05-20 02:10:22 source WARN debezium-sqlserverconnector-CIR-change-event-source-coordinator i.d.c.s.SqlServerStreamingChangeEventSource(executeIteration):191 No maximum LSN recorded in the database; this may happen if there are no changes recorded in the change table yet or low activity database where the cdc clean up job periodically clears entries from the cdc tables. Otherwise, this may be an indication that the SQL Server Agent is not running. You should follow the documentation on how to configure SQL Server Agent running status query.
2026-05-20 02:10:22 source WARN debezium-sqlserverconnector-CIR-change-event-source-coordinator i.d.c.s.SqlServerStreamingChangeEventSource(executeIteration):195 Cannot query the status of the SQL Server Agent com.microsoft.sqlserver.jdbc.SQLServerException: VIEW SERVER STATE permission was denied on object 'server', database 'master'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:356) ~[mssql-jdbc-13.4.0.jre11.jar:?]
And we conclude the sync job successfully - this is correct as there were no changes in table.
The problem is that we're not saving a new state, which leads to eventually having the saved LSN becoming invalid as the CDC log with that LSN location will get recycled by the server eventually.
A better behavior would be to refresh the saved LSN in state to ensure it is fresh.
Internal Tracking: https://github.com/airbytehq/oncall/issues/12670
When mssql CDC table are static, the server eventually shuts off its internal transaction logs agent.
When we attempt to CDC read from the server, debezium fails to connect with "Cannot query the status of the SQL Server Agent":
And we conclude the sync job successfully - this is correct as there were no changes in table.
The problem is that we're not saving a new state, which leads to eventually having the saved LSN becoming invalid as the CDC log with that LSN location will get recycled by the server eventually.
A better behavior would be to refresh the saved LSN in state to ensure it is fresh.
Internal Tracking: https://github.com/airbytehq/oncall/issues/12670