Home Forums Programming Powershell Scripting CDC objects with powershell RE: Scripting CDC objects with powershell

  • Cheers for trying it, think that option is actually for Change Tracking rather than CDC (thought that might have been the case when I suggested it, but worth a try).

    Seems SMO doesn't support scripting for CDC (or vice-versa): https://connect.microsoft.com/SQLServer/feedback/details/774042/transfer-or-script-out-cdc-enabled-tables-using-smo

    All I can think of is creating & maintaining your own T-SQL for the CDC tables, perhaps put something in your PoSh script to append it to the generated file.