diff --git a/Documentation/sp_Blitz_Checks_by_Priority.md b/Documentation/sp_Blitz_Checks_by_Priority.md index 0458b8c7..5c12ec03 100644 --- a/Documentation/sp_Blitz_Checks_by_Priority.md +++ b/Documentation/sp_Blitz_Checks_by_Priority.md @@ -6,8 +6,8 @@ Before adding a new check, make sure to add a Github issue for it first, and hav 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. -CURRENT HIGH CHECKID: 265. -If you want to add a new one, start at 266. +CURRENT HIGH CHECKID: 266. +If you want to add a new one, start at 267. | Priority | FindingsGroup | Finding | URL | CheckID | |----------|-----------------------------|---------------------------------------------------------|------------------------------------------------------------------------|----------| @@ -301,6 +301,7 @@ If you want to add a new one, start at 266. | 250 | Server Info | Drive Space | | 92 | | 250 | Server Info | Full-text Filter Daemon is Currently Offline | | 168 | | 250 | Server Info | Hardware | | 84 | +| 250 | Server Info | Hardware - Memory Counters | https://www.BrentOzar.com/go/target | 266 | | 250 | Server Info | Hardware - NUMA Config | | 114 | | 250 | Server Info | Instant File Initialization Enabled | https://www.BrentOzar.com/go/instant | 193 | | 250 | Server Info | Locked Pages in Memory Enabled | https://www.BrentOzar.com/go/lpim | 166 | diff --git a/sp_Blitz.sql b/sp_Blitz.sql index ca0963bf..f1afb001 100644 --- a/sp_Blitz.sql +++ b/sp_Blitz.sql @@ -9970,6 +9970,36 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1 END; END; /* CheckID 261 */ + + IF NOT EXISTS ( SELECT 1 + FROM #SkipChecks + WHERE DatabaseName IS NULL AND CheckID = 266 ) + BEGIN + INSERT INTO #BlitzResults + ( CheckID , + Priority , + FindingsGroup , + Finding , + URL , + Details + ) + SELECT 266 AS CheckID , + 250 AS Priority , + 'Server Info' AS FindingsGroup , + 'Hardware - Memory Counters' AS Finding , + 'https://www.brentozar.com/go/target' AS URL , + N'Target Server Memory (GB): ' + CAST((CAST((pTarget.cntr_value / 1024.0 / 1024.0) AS DECIMAL(10,1))) AS NVARCHAR(100)) + + N' Total Server Memory (GB): ' + CAST((CAST((pTotal.cntr_value / 1024.0 / 1024.0) AS DECIMAL(10,1))) AS NVARCHAR(100)) + FROM sys.dm_os_performance_counters pTarget + INNER JOIN sys.dm_os_performance_counters pTotal + ON pTotal.object_name LIKE 'SQLServer:Memory Manager%' + AND pTotal.counter_name LIKE 'Total Server Memory (KB)%' + WHERE pTarget.object_name LIKE 'SQLServer:Memory Manager%' + AND pTarget.counter_name LIKE 'Target Server Memory (KB)%' + END + + + END; /* IF @CheckServerInfo = 1 */ END; /* IF ( ( SERVERPROPERTY('ServerName') NOT IN ( SELECT ServerName */