How to Enable and Disable CDC (Change Data Capture) in SQL Server 2008

PandianS
Posted by PandianS under Sql Server category on | Views : 7156
CDC - Change Data Capture

Enable CDC on Database Level:
ALTER DATABASE [DotnetFunda] SET CHANGE_TRACKING (CHANGE_RETENTION = 5 DAYS)
Disable CDC on Database Level:
ALTER DATABASE [DotnetFunda] SET CHANGE_TRACKING = OFF
Enable CDC on Table Level:
Use [DotnetFunda]
Go
ALTER TABLE [dbo].[Tb_Table1] ENABLE CHANGE_TRACKING WITH(TRACK_COLUMNS_UPDATED = ON)
Disable CDC on Table Level:
Use [DotnetFunda]
Go
ALTER TABLE [dbo].[Tb_Table1] DISABLE CHANGE_TRACKING

Comments or Responses

Login to post response