Below are the commands used to enable/disable change tracking in the SQL.
1. Enable change tracking on the database
ALTER DATABASE AXDBNAME
SET CHANGE_TRACKING = ON
(CHANGE_RETENTION = 2 DAYS, AUTO_CLEANUP = ON)
2. Enable Change Tracking for a Table
ALTER TABLE TableName
ENABLE CHANGE_TRACKING
WITH (TRACK_COLUMNS_UPDATED = ON)
3. Disable Change Tracking for a Database
ALTER DATABASE AdventureWorks2012
SET CHANGE_TRACKING = OFF
4. Disable Change Tracking for a Table
ALTER TABLE TableName
DISABLE CHANGE_TRACKING;
No comments:
Post a Comment