This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER DATABASE CT_Demo | |
SET CHANGE_TRACKING = ON | |
(CHANGE_RETENTION = 30 DAYS, AUTO_CLEANUP = ON); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Kendra Little made this; posted at https://www.brentozar.com/archive/2014/06/performance-tuning-sql-server-change-tracking/ | |
SELECT db.name AS change_tracking_db, | |
is_auto_cleanup_on, | |
retention_period, | |
retention_period_units_desc | |
FROM sys.change_tracking_databases AS ct | |
JOIN sys.databases AS db | |
ON ct.database_id=db.database_id; | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER DATABASE CT_Demo | |
SET CHANGE_TRACKING = OFF; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER DATABASE CT_Demo | |
SET CHANGE_TRACKING | |
(CHANGE_RETENTION = 14 DAYS, AUTO_CLEANUP = ON); |