From f0bc9a9698abd9c8b1e9e635c6a8e45a07a6d64c Mon Sep 17 00:00:00 2001 From: FranciscoNabas <40699992+FranciscoNabas@users.noreply.github.com> Date: Wed, 3 May 2023 14:35:10 -0300 Subject: [PATCH] Update sql-performance.md The default retention period for change tracking on MS SQL Server is 2 days, but for the configuration manager, it should always be 5 days. The places where I got this info from: - When installing a site server, the database auto cleanup retention period is 5 days. - When looking the code for the stored procedure 'spDiagChangeTracking', while gathering change tracking information we can see a comment saying that for SCCM it should always be 5 days (screen shot will be included in the PR). - While troubleshooting a change tracking issue, I've set the retention for two days, and the auto cleanup couldn't keep up. I understand that while troubleshooting performance issues, cleaning the change tracking information up to 2 days can improve performance, however this can be misleading, since this query will always return 'there is change tracking backlog, please contact Microsoft support'. Cleaning more change tracking than default can also mask the real cause for performance issues. Thank you! --- .../core/servers/manage/replication/sql-performance.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/memdocs/configmgr/core/servers/manage/replication/sql-performance.md b/memdocs/configmgr/core/servers/manage/replication/sql-performance.md index cf3543c2598..c9f012260ad 100644 --- a/memdocs/configmgr/core/servers/manage/replication/sql-performance.md +++ b/memdocs/configmgr/core/servers/manage/replication/sql-performance.md @@ -48,8 +48,8 @@ ELSE IF @RetentionUnit = 2 ELSE IF @RetentionUnit = 3 SET @CTCutOffTime = DATEADD(DAY,-@RetentionPeriod,GETUTCDATE()) --- give a buffer of two days -SET @CTCutOffTime = DATEADD(DAY, -2, @CTCutOffTime) +-- give a buffer of five days +SET @CTCutOffTime = DATEADD(DAY, -5, @CTCutOffTime) select top 1 @CTMinTime=commit_time from sys.dm_tran_commit_table order by commit_ts asc IF @CTMinTime < @CTCutOffTime PRINT 'there is change tracking backlog, please contact Microsoft support'