I have been performing CDC task , after any insert/update operation, the CT table is not being reflected with any changes made

Ashutosh Ubale 1 Reputation point
2021-07-01T14:55:03.707+00:00

The CDC is enabled at database as well as table level. Still, no changes in the CT table.

Azure Database Migration service
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anurag Sharma 17,606 Reputation points
    2021-07-05T06:13:42.153+00:00

    Hi @Ashutosh Ubale , welcome to Microsoft Q&A forum.

    Can you please run below commands and check if CDC is properly enabled?

    select is_cdc_enabled,* from sys.databases;  
    select name,is_tracked_by_cdc from sys.tables;  
    

    If it is not enable we can configure it at both database and table level.

    After enabling the CD at database level, for enabling the CDC at table level, we must be using below commands:

    EXEC sys.sp_cdc_enable_table    
    @source_schema = N'dbo',    
    @source_name   = N'test',    
    @role_name     = NULL,    
    @supports_net_changes = 1    
    

    After you enable the CDC as mentioned for above table, please check if the CDC instance is created in system tables as shown below:

    111771-image.png

    After this, we can directly query the above table to see all the changes captured or not (by doing some insert/update/delete operations):

    111782-image.png

    Just one query, are you using Azure SQL database for CDC?

    Please let me know if this helps or else we can further discuss the same.

    ----------

    If answer helps, you can mark it 'Accept Answer'


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.