My Database has CDC enabled and the table i want to track changes using the below T-SQL,
EXEC sys.sp_cdc_enable_db; GO EXEC sys.sp_cdc_enable_table @source_schema = N'dbo', @source_name = N'tblName', @role_name = NULL, @supports_net_changes = 1; GO
Then two jobs created for cdc capture and cleanup.
1. cdc.DBName_capture 2. cdc.DBName_cleanup
Capture job having the two steps to execute
1. Starting Change Data Capture Collection Agent 2. Change Data Capture Collection Agent.
But, when I view the history (With right clicking the capture job and click 'View history'), and found that Step 1 is executed, and there is no step 2.
Also, there is no data recorded in
tblName_CT table while inserting or updating the table.
cdc.lsn_time_mapping table doesn't have any entries.
SQL Server Agent is runnning, and I also tried the whole steps after restarting the SQL Server Agent. But, no change data captured in tableName_CT table.
How to resolve and capture the changes?
Thank you so much, in advance!