Quantcast
Channel: Welcome To TechBrothersIT
Viewing all articles
Browse latest Browse all 1979

How to enable Change Data Capture on one or more tables in a SQL Server Database?

$
0
0
You can enable CDC on one or more table using below T-SQL Statement

Use [Your_Database_name]

EXECsys.sp_cdc_enable_table
@source_schema =N'Your_Schema_name',--Table Schema name such as dbo
@source_name =N'Table_name',--Table name that you would like to enable CDC on such as mytable
@role_name =NULL,
@filegroup_name =N'FilegroupName'-- File Group for Change Data Capture table such as Secondary

Viewing all articles
Browse latest Browse all 1979

Trending Articles