Let say I have a table table1 with the following columns
colID, col1, col2, col3, col4, col5
Then I enable CDC for table1 and capture the following column: colID,col2,col4
Let say tomorrow I add col6 and col7 into table1 table.
Is there a Stored Procedures to include col6 into the captured column list? Currently, this is how I do it, disabling the CDC on the table and then enable it again with col6 in the captured_column_list. The problem with this is that it
will clear out all the captured data. Any thought?
BryianTan
Contributor
5626 Points
1083 Posts
SQL Server 2008 R2 Change Data Capture add addtional column to table
Apr 17, 2012 04:55 PM|LINK
Hello,
Let say I have a table table1 with the following columns
colID, col1, col2, col3, col4, col5
Then I enable CDC for table1 and capture the following column: colID,col2,col4
Let say tomorrow I add col6 and col7 into table1 table.
Is there a Stored Procedures to include col6 into the captured column list? Currently, this is how I do it, disabling the CDC on the table and then enable it again with col6 in the captured_column_list. The problem with this is that it will clear out all the captured data. Any thought?
Thanks,
Bryian Tan
MCP, MCAD, MCTS
My blog...
molly_c
Participant
1590 Points
401 Posts
Re: SQL Server 2008 R2 Change Data Capture add addtional column to table
Apr 19, 2012 10:32 AM|LINK
You can use sys.sp_cdc_get_captured_columns to captured columns..after you add that columns, your table structure changed, it will be in the list.
Molly
It's time to start living the life you are imagined.