CDC polling mechanism

  • Can anyone explicitly explain how SQL Server conducts polling for CDC, the documentation states that:-

    "The capture job is started immediately. It runs continuously, processing a maximum of 1000 transactions per scan cycle with a wait of 5 seconds between cycles"

    What I want to know is how physically is this 'wait' happening. I can see that it is not the CDC job itself, as there is not scheduler attached to it, every re-run every 5 seconds. Does this mean that it is a continuous loop, re checking every 5 seconds?

    Thanks

  • For those reading this, this the CDC capture job uses the system 'Replication Log Reader Agent' which as MSDN states:-

    "he Replication Log Reader Agent is an executable that monitors the transaction log of each database configured for transactional replication and copies the transactions marked for replication from the transaction log into the distribution database."

  • Change Data Capture (CDC) is a SQL job that crawls the sql server transaction log looking for changes. When a change is read it writes an entry to its separate capture tables, the before and after images of the affected row.

    A job as you probably know can be kicked off on a schedule by the agent process in the background.

    ----------------------------------------------------

  • Thanks Martin,

    I was really looking at where the physical repeating polling mechanism takes places, i.e. every 5 seconds for example, as it doesn't seem to be in the job recurring schedule?

  • I am not too knowledgeable on that level. I can say the capture job runs continuously but somehow knows when there is idle time in the system. Only then does it do its work. It does has low overhead.

    ----------------------------------------------------

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply