Answered by:
Transfer or script-out cdc enabled tables using SMO.

Question
-
Hi Team,
Please let me know anyway to transfer or script-out cdc enabled tables using SMO. Actually I have some tables with CDC enabled in source server and need to transfer those tables to target server with CDC enabled. Please let me know the way to achieve this.
Thank You,
Dilip
- Edited by D. S. Dodiya Tuesday, December 4, 2012 7:48 PM correction
Tuesday, December 4, 2012 8:17 AM
Answers
-
It seems like we may have a bug in SMO scripting on CDC enabled tables. Please report this issue at https://connect.microsoft.com/SQLServer/Feedback
I tried scripting out a table with change tracking enabled. I don't see the required DDL in the generated script that enabled change tracking for table.
Thanks
Sethu Srinivasan [MSFT]
SQL Server
- Proposed as answer by Ed Price - MSFTMicrosoft employee Tuesday, December 11, 2012 10:05 PM
- Marked as answer by Iric Wen Wednesday, December 12, 2012 9:45 AM
Thursday, December 6, 2012 5:00 PM
All replies
-
Does there any one have some experiences?Wednesday, December 5, 2012 9:50 AM
-
It seems like we may have a bug in SMO scripting on CDC enabled tables. Please report this issue at https://connect.microsoft.com/SQLServer/Feedback
I tried scripting out a table with change tracking enabled. I don't see the required DDL in the generated script that enabled change tracking for table.
Thanks
Sethu Srinivasan [MSFT]
SQL Server
- Proposed as answer by Ed Price - MSFTMicrosoft employee Tuesday, December 11, 2012 10:05 PM
- Marked as answer by Iric Wen Wednesday, December 12, 2012 9:45 AM
Thursday, December 6, 2012 5:00 PM -
Hi Sethu,
Change tracking is supported in SMO [refer below code snippet] but here the issue with Change Data Capture.
Transfer trsfrDB = new Transfer();
trsfrDB.Options.ChangeTracking=true;I took this issue to SQL Server Development team and they also confirmed that this is a bug in SMO. As per them - “SMO doesn’t support any CDC specifics at the moment”.
Thank You,
DilipWednesday, December 12, 2012 10:29 PM