SQL Server Change Detection
Enable for Database: ALTER DATABASE <Database Name> SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 2 DAYS , AUTO_CLEANUP = ON ) Disable for Database ALTER DATABASE <Database Name> SET CHANGE_TRACKING = OFF Enable for Each table: ALTER TABLE <Table Name> ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON ) Disable for table ALTER TABLE <Table Name> DISABLE CHANGE_TRACKING; Create Enable Tracking for All Tables select 'ALTER TABLE ' + name + ' ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON);' from sys.tables where type = 'U' -- USER_TABLE type List All Indexes SELECT TableName = t.name, IndexName = ind.name, IndexId = ind.index_id, ColumnId = ic.index_column_id, ColumnName = col.name, ind. * , ic. * , col. * FROM sys.indexes ind INNER JOIN sys.index_columns ic ON ind.object_id = ic.object_id and ind.index_id = ic.index_id INNER JOIN...