question

AshutoshUbale-6931 avatar image
0 Votes"
AshutoshUbale-6931 asked SaurabhSharma-msft commented

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

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

azure-database-migration
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AnuragSharma-MSFT avatar image
0 Votes"
AnuragSharma-MSFT answered SaurabhSharma-msft commented

Hi @AshutoshUbale-6931, 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'





image.png (19.7 KiB)
image.png (15.8 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AshutoshUbale-6931, just wanted to follow up on this if you need more details.

0 Votes 0 ·

Hi @ashutoshubale-6931,

We have not heard back from you. Did @anuragsharma-msft's answer solve your issue? If so, please mark as accepted answer. If not, please let us know how we may better assist.

Thanks
Saurabh

0 Votes 0 ·