Transfer or script-out cdc enabled tables using SMO. RRS feed

  • 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,

    • Edited by D. S. Dodiya Tuesday, December 4, 2012 7:48 PM correction
    Tuesday, December 4, 2012 8:17 AM


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.


    Sethu Srinivasan [MSFT]

    SQL Server


    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();

    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,

    Wednesday, December 12, 2012 10:29 PM