Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi All
I need to enable CDC on multiple tables on MSSQL server database,the normal syntax I found is :-
SQL
USE MyDB
GO
EXEC sys.sp_cdc_enable_table
@source_schema = N'dbo',
@source_name   = N'MyTable',
@role_name     = N'MyRole',
@supports_net_changes = 1
GO

I might be incorrect in the concept application.Need help on this!!
Regards

What I have tried:

Tried using addtional tables seperated by ',' &'and', however ended up with syntax error:(
SQL
USE MyDB
USE TEST_CDC
GO
EXEC sys.sp_cdc_enable_table                                                                               
@source_schema = N'dbo',
@source_name   = N'CustLookup'
@Source_name = N'CustmrSrc',
@role_name     = NULL,
@supports_net_changes = 1
GO
Posted
Updated 27-Jul-16 19:13pm

1 solution

Take a look at this link hope this will help you out: An Overview of Change Data Capture in SQL Server | SQL Server DBA[^]
 
Share this answer
 
Comments
mousau 28-Jul-16 4:12am    
Hi Daniel
Thanks a lot for the response.The link mentioned by you also describes the identical syntax.If i gotta try multiple tables as the source name.then i got the repeat the entire steps from CDC_Enable_Table!!!

Thank You
Regards

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900