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
{{ message }}
Repository navigation
Commit 9e33bd6
Browse filesBrowse the repository at this point in the historyBrowse files
HIGH (4):
- Line 7414: 'dbo.MSreplication_objects' never matches sys.tables.name —
replication subscriber check (CheckID 19 Method B) was dead code.
Fixed to 'MSreplication_objects'
- Line 6805: Missing ISNULL in THEN branch for AG replica lag (CheckID 185) —
Details became NULL when last_commit_time was NULL
- Line 4900: Duplicate CheckID 145 used for both Hekaton memory and
Accelerated Database Recovery. Changed ADR to new CheckID 275
- Lines 6576-6604: GROUP BY included transaction_type and transaction_state
(CheckID 215) — produced duplicate rows with wrong partial counts
MEDIUM (6):
- Lines 8796-8800: Trace flag 7752 CASE branch ordering — specific messages
for @CheckUserDatabaseObjects and @QueryStoreInUse unreachable on SQL 2019+
- Line 5508: ISNULL(@var, @var) no-op replaced with ISNULL(@var, '(unknown)')
- Lines 5736-5743: @MaximumVersionDate only tracked for first outdated
component, not the actual maximum
- Lines 1479/1513-1516: CheckID 256 SkipChecks filter commented out with
wrong CheckID reference (2 instead of 256). Uncommented and fixed
- Lines 3989-3998: CheckID 270 "last 4 hours" claim had no time filter on
snapshot_time from sys.dm_os_memory_health_history
- Lines 10267/10269: Named instances never reported CheckID 266 memory
counters — hardcoded 'SQLServer:Memory Manager%' changed to '%Memory Manager%'
LOW (4):
- Line 5655: sp_executesql parameter DATETIME vs DATETIME2 mismatch
- Line 8114: Debug RAISERROR said CheckID 218, should be 225
- Line 8857: TF 7752 recommendation had spurious FROM #TraceStatus producing
duplicate rows
- Line 2049: Double ++ typo in string concatenation
- Line 7695: Missing % wildcard on sp_PressureDetector exclusion
- Line 1839: CheckID 2301 missing DatabaseName IS NULL in SkipChecks filter
- Line 7674: Dead JOIN SM.object_id = DB_id() removed (object_id vs database_id)
Documentation updated: CheckID 275 added, high CheckID bumped to 275.
Tested default, @CheckServerInfo, @CheckUserDatabaseObjects=0,
@OutputType='MARKDOWN', and @SkipChecksTable on sql2022 — all pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: Documentation/sp_Blitz_Checks_by_Priority.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ Before adding a new check, make sure to add a Github issue for it first, and hav
6
6
7
7
If you want to change anything about a check - the priority, finding, URL, or ID - open a Github issue first. The relevant scripts have to be updated too.
IF @Debug IN (1, 2) RAISERROR('Running CheckId [%d].', 0, 1, 2301) WITHNOWAIT;
@@ -2046,7 +2046,7 @@ AS
2046
2046
''Performance'' AS FindingsGroup,
2047
2047
''Server Triggers Enabled'' AS Finding,
2048
2048
''https://www.brentozar.com/go/logontriggers/'' AS URL,
2049
-
(''Server Trigger ['' + [name] ++ ''] is enabled. Make sure you understand what that trigger is doing - the less work it does, the better.'') AS Details
2049
+
(''Server Trigger ['' + [name] + ''] is enabled. Make sure you understand what that trigger is doing - the less work it does, the better.'') AS Details
2050
2050
FROM sys.server_triggers
2051
2051
WHERE is_disabled = 0 AND is_ms_shipped = 0 AND name NOT LIKE ''rds^_%'' ESCAPE ''^'' OPTION (RECOMPILE);';
2052
2052
@@ -3995,6 +3995,7 @@ AS
3995
3995
+N' severity level memory issues reported in the last 4 hours in sys.dm_os_memory_health_history.'
ANDSERVERPROPERTY('EngineEdition') <>8; /* Hekaton is always enabled in Managed Instances per https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/1919 */
'Download an updated First Responder Kit. Your version check failed due to dynamic query failure.'+ @crlf +
5508
-
'Error: following query failed at execution (check if component ['+ISNULL(@CurrentComponentName,@CurrentComponentName) +'] is mandatory and missing)'+ @crlf +
5509
+
'Error: following query failed at execution (check if component ['+ISNULL(@CurrentComponentName,'(unknown)') +'] is mandatory and missing)'+ @crlf +
LEFT OUTER JOIN master.sys.databases AS sDB ON SM.object_id = DB_id()
7671
7674
LEFT OUTER JOIN dbo.sysobjects AS SO ON SM.object_id = SO.id and type = ''P''
7672
7675
LEFT OUTER JOIN INFORMATION_SCHEMA.ROUTINES AS ISR on ISR.Routine_Name = SO.name AND ISR.SPECIFIC_CATALOG = DB_Name()
7673
7676
WHERE SM.is_recompiled=1 OPTION (RECOMPILE); /* oh the rich irony of recompile here */
@@ -7688,7 +7691,7 @@ IF @ProductVersionMajor >= 10
7688
7691
Details ='['+ DBName +'].['+ SPSchema +'].['+ ProcName +'] has WITH RECOMPILE in the stored procedure code, which may cause increased CPU usage due to constant recompiles of the code.',
7689
7692
CheckID ='78'
7690
7693
FROM #RecompileAS TR
7691
-
WHERE ProcName NOTLIKE'sp_AllNightLog%'AND ProcName NOTLIKE'sp_AskBrent%'AND ProcName NOTLIKE'sp_Blitz%'AND ProcName NOTLIKE'sp_PressureDetector'
7694
+
WHERE ProcName NOTLIKE'sp_AllNightLog%'AND ProcName NOTLIKE'sp_AskBrent%'AND ProcName NOTLIKE'sp_Blitz%'AND ProcName NOTLIKE'sp_PressureDetector%'
7692
7695
AND DBName NOTIN ('master', 'model', 'msdb', 'tempdb');
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.'
8794
8797
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?'
8795
8798
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?'
8796
-
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.'
8797
8799
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.'
8798
8800
WHEN [T].[TraceFlag] ='7752'AND @QueryStoreInUse =1THEN'7752 enabled globally, which stops queries needing to wait on Query Store loading up after database recovery.'
8801
+
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.'
8799
8802
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?'
8800
8803
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?'
8801
8804
WHEN [T].[TraceFlag] ='8048'THEN'8048 enabled globally, which tries to reduce CMEMTHREAD waits on servers with a lot of logical processors.'
'Trace Flag 7752 not enabled globally. It stops queries needing to wait on Query Store loading up after database recovery. It is so recommended that it is enabled by default as of SQL Server 2019.'AS Details
8853
-
FROM #TraceStatus T
8855
+
'Trace Flag 7752 not enabled globally. It stops queries needing to wait on Query Store loading up after database recovery. It is so recommended that it is enabled by default as of SQL Server 2019.'AS Details;
8854
8856
END;
8855
8857
END;
8856
8858
@@ -10260,9 +10262,9 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
10260
10262
+N' Total Server Memory (GB): '+CAST((CAST((pTotal.cntr_value/1024.0/1024.0) ASDECIMAL(10,1))) ASNVARCHAR(100))
0 commit comments