You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix database object-related trace flag check wording
This adds additional context to the checks for Trace Flags 834, 7745 and 7752 that have messages dependent on @CheckUserDatabasesObjects = 1 (Or that and @Bringthepain = 1 for database counts over 50).
So when you just ran sp_Blitz, you could end up with Trace Flag 7745 telling you that no databases have query store enabled even if you do (Because the check @QueryStoreInUse couldn't run)
CASEWHEN [T].[TraceFlag] ='652'THEN'652 enabled globally, which disables pre-fetching during index scans. This is usually a very bad idea.'
8563
8563
WHEN [T].[TraceFlag] ='661'THEN'661 enabled globally, which disables ghost record removal, causing the database to grow in size. This is usually a very bad idea.'
8564
8564
WHEN [T].[TraceFlag] ='834'AND @ColumnStoreIndexesInUse =1THEN'834 is enabled globally, but you also have columnstore indexes. That combination is not recommended by Microsoft.'
8565
+
WHEN [T].[TraceFlag] ='834'AND @CheckUserDatabaseObjects =0THEN'834 is enabled globally, but @CheckUserDatabaseObjects was set to 0, so we skipped checking if any databases have columnstore indexes. That combination is not recommended by Microsoft.'
8565
8566
WHEN [T].[TraceFlag] ='1117'THEN'1117 enabled globally, which grows all files in a filegroup at the same time.'
8566
8567
WHEN [T].[TraceFlag] ='1118'THEN'1118 enabled globally, which tries to reduce SGAM waits.'
8567
8568
WHEN [T].[TraceFlag] ='1211'THEN'1211 enabled globally, which disables lock escalation when you least expect it. This is usually a very bad idea.'
WHEN [T].[TraceFlag] ='3226'THEN'3226 enabled globally, which keeps the event log clean by not reporting successful backups.'
8576
8577
WHEN [T].[TraceFlag] ='3505'THEN'3505 enabled globally, which disables Checkpoints. This is usually a very bad idea.'
8577
8578
WHEN [T].[TraceFlag] ='4199'THEN'4199 enabled globally, which enables non-default Query Optimizer fixes, changing query plans from the default behaviors.'
8579
+
WHEN [T].[TraceFlag] ='7745'AND @CheckUserDatabaseObjects =0THEN'7745 enabled globally, which makes shutdowns/failovers quicker by not waiting for Query Store to flush to disk. This good idea loses you the non-flushed Query Store data. @CheckUserDatabaseObjects was set to 0, so we skipped checking if any databases have Query Store enabled.'
8578
8580
WHEN [T].[TraceFlag] ='7745'AND @QueryStoreInUse =1THEN'7745 enabled globally, which makes shutdowns/failovers quicker by not waiting for Query Store to flush to disk. This good idea loses you the non-flushed Query Store data.'
8579
8581
WHEN [T].[TraceFlag] ='7745'AND @ProductVersionMajor >12THEN'7745 enabled globally, which is for Query Store. None of your databases have Query Store enabled, so why do you have this turned on?'
8580
8582
WHEN [T].[TraceFlag] ='7745'AND @ProductVersionMajor <=12THEN'7745 enabled globally, which is for Query Store. Query Store does not exist on your SQL Server version, so why do you have this turned on?'
8581
8583
WHEN [T].[TraceFlag] ='7752'AND @ProductVersionMajor >14THEN'7752 enabled globally, which is for Query Store. However, it has no effect in your SQL Server version. Consider turning it off.'
8584
+
WHEN [T].[TraceFlag] ='7752'AND @CheckUserDatabaseObjects =0THEN'7752 enabled globally, which stops queries needing to wait on Query Store loading up after database recovery. @CheckUserDatabaseObjects was set to 0, so we skipped checking if any databases have Query Store enabled.'
8582
8585
WHEN [T].[TraceFlag] ='7752'AND @QueryStoreInUse =1THEN'7752 enabled globally, which stops queries needing to wait on Query Store loading up after database recovery.'
8583
8586
WHEN [T].[TraceFlag] ='7752'AND @ProductVersionMajor >12THEN'7752 enabled globally, which is for Query Store. None of your databases have Query Store enabled, so why do you have this turned on?'
8584
8587
WHEN [T].[TraceFlag] ='7752'AND @ProductVersionMajor <=12THEN'7752 enabled globally, which is for Query Store. Query Store does not exist on your SQL Server version, so why do you have this turned on?'
0 commit comments