ADF Change Data Capture

Ashwani SRIVASTAVA 60 Reputation points
2023-11-18T04:13:11.9766667+00:00

Hi,

I have setup ADF CDC (Change Data Capture) which is currently in Preview to sync data from SQL Server Managed Instance to another SQL Server Managed Instance however it is not replicating any data. Source table and target table are identical in terms of columns and data types. I have also used below statements on my source database to enable CDC at database level for the table.
Anyone got any suggestions what the issue might be?

Note: The CDC pipeline is started.

EXEC sys.sp_cdc_enable_db

EXEC sys.sp_cdc_enable_table  
	@source_schema = N'dbo'  
	, @source_name = N'MytableName'  
	, @role_name = N'cdc_admin'  
	, @supports_net_changes = 1
        , @captured_column_list = NULL;

User's image

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
0 comments No comments
{count} votes

Answer accepted by question author
  1. ShaikMaheer-MSFT 38,631 Reputation points Microsoft Employee Moderator
    2023-11-22T10:53:02.7866667+00:00

    Hi Ashwani SRIVASTAVA,

    Thank you for posting query in Microsoft Q&A Platform.

    Kindly delete existing CDC resource and recreate new one and make sure below points. It will work.

    • Before creating CDC resource make sure CDC enabled on DB and on source table.
    • During creation of CDC resource don't have any changes on source table data.
    • In the CDC set the Key column correctly.
    • set latency of CDC to real time.
    • once above all done, then publish the changes and then start CDC.

    Please note, during entire CDC creation process make sure no changes on happening on source table for better experience.

    Hope this helps. Please let me know if any further queries.


    Please consider hitting Accept Answer button. Accepted answers help community as well. Thank you.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Amira Bedhiafi 41,121 Reputation points Volunteer Moderator
    2023-11-18T10:31:04.3266667+00:00

    If the change rate on your source table is very low or if there haven't been changes since you enabled CDC, there might not be any data to replicate. Insert or update some rows in your source table to test.


Your answer

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