I enabled Change Data Capture on some tables in a Microsoft SQL 2008 database. Both of the following queries return 1:

select top 1 is_cdc_enabled from sys.databases where name = N'<DatabaseName>'

select top 1 T.[is_tracked_by_cdc]
    from sys.tables as T
        left join sys.schemas as S
        on T.[schema_id] = S.[schema_id]
    where S.[name] = N'<SchemaName>' and T.[name] = N'<TableName>'

but when I change the data of a concerned table, cdc.<SchemaName>_<TableName>_CT remains empty.


  • 3
    Why do you use LEFT JOIN and WHERE that actually makes it INNER JOIN ? – a1ex07 Jun 23 '12 at 13:56

Check to make sure the SQL Agent is running, and that there is a capture job created that is enabled and running for the CDC instance, it should show Change Data Capture Collection Agent / executing.

  • Exact. The job was in failed state, and the history displayed the errors. Thank you for the hint. – Arseni Mourzenko Jun 23 '12 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.