How to populate CDC preview source if a table does not have column of datetime datatype and CDC is enabled to the table

Nidhi S 5 Reputation points
2023-08-03T11:28:02.33+00:00

Hello, I'm trying to create a CDC preview pipeline in Azure Data Factory.

I have a requirement to capture change data of multiple tables of a particular SQL server.

  • Here in these multiple tables some have columns with datetime datatype, and some do not.

CDC has been enabled to all the tables irrespective of whether tables have columns with datetime datatype.

My blocker here is CDC preview source option is only populating the tables with datetime datatype columns, but not others even though for which CDC is enabled.

I want the CDC preview to populate all tables after enabling CDC to the tables, is there any settings or how to achieve this.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,443 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Bhargava-MSFT 31,246 Reputation points Microsoft Employee
    2023-08-04T20:14:01.23+00:00

    Hello Franklin John

    Since you have already enabled CDC on the DB and table level, please confirm if you have enabled @supports_net_changes =1 on the table level.

    I believe this is causing the issue here.

    I see the same behavior when suppots_net_changes is not enabled on the tables.

    EXEC sys.sp_cdc_enable_table  
       @source_schema  = N'dbo',  
       @source_name    = N'tab2',  
       @role_name      = NULL,  
       @filegroup_name = NULL,  
       @supports_net_changes = 1
    GO
    
    1 person found this answer helpful.
    0 comments No comments

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.