1

When the CDC Capture job runs, it fails with this error:

Cannot insert duplicate key row in object cdc.Table_CT' with unique index 'CT Clustered Index.

This index is a SQL Server CDC created index on columns __start_lsn, __$command_id, __$seqval, __$operation.

Any ideas how to simulate this to trap why this happens, or a way to overcome these issues with CDC? Do I need to enable traceflags, or CU installed, etc?

Additional info: RCSI (Read Committed Snapshot Isolation) is enabled on the database. Not sure if this could possibly cause the issue experienced.

The only solution to get passed this error was to disable CDC on the database and re-enable the database and then the affected table. In this scenario, we were fortunate to do this, but this can not be done on other environments

2
  • sql version is 'sql server 2019 (RTM-CU15)(KB5008996)' Commented May 21 at 0:43
  • Seems cdc doesn't update the log to release it, and therefore tries to re insert and causes the issue. No solution as yet. Commented May 21 at 19:14

1 Answer 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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