Adsense_01

Wednesday, 27 January 2010

CDC - Change Data Capture

Quite useful for Auditing in finding the insert, update & delete in a database and this can be placed in another new table.

--TO activate the CDC
EXEC sys.sp_cdc_enable_db_change_data_capture

--To enable CDC on table
EXEC sys.sp_cdc_enable_table_change_data_capture @source_schema = 'dbo',
@source_name = 'myTable', @role_name = 'cdc'

This enables tracking down the changes and auditing much easier the way it was in the past. I really have to spend a lot of time on this in past, but this new feature is really cool.

No comments:

Post a Comment