SQL Server跟踪表的增删改情况的SQL语句

EXEC sys.sp_cdc_enable_db

 EXEC sys.sp_cdc_enable_table
    @source_schema = N'dbo'
  , @source_name = N'osm_department'
  , @role_name = null--增加的角色
  , @capture_instance = N'osm_department'--实例名
  , @supports_net_changes = 1
  , @index_name = null
  , @captured_column_list = null--跟踪的字段
  , @filegroup_name = N'PRIMARY';

 

你可能感兴趣的:(编程,SQL,表跟踪)