Skip to content

Commit 47b5482

Browse files
committed
#3690 sp_Blitz memory pressure
Add warning about low memory recently. Closes #3690.
1 parent e386bf4 commit 47b5482

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

Documentation/sp_Blitz_Checks_by_Priority.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Before adding a new check, make sure to add a Github issue for it first, and hav
66

77
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.
88

9-
CURRENT HIGH CHECKID: 269.
10-
If you want to add a new one, start at 270.
9+
CURRENT HIGH CHECKID: 270.
10+
If you want to add a new one, start at 271.
1111

1212
| Priority | FindingsGroup | Finding | URL | CheckID |
1313
|----------|-----------------------------|---------------------------------------------------------|------------------------------------------------------------------------|----------|
@@ -26,6 +26,7 @@ If you want to add a new one, start at 270.
2626
| 1 | Corruption | Database Corruption Detected | https://www.BrentOzar.com/go/repair | 90 |
2727
| 1 | Performance | Memory Dangerously Low | https://www.BrentOzar.com/go/max | 51 |
2828
| 1 | Performance | Memory Dangerously Low in NUMA Nodes | https://www.BrentOzar.com/go/max | 159 |
29+
| 1 | Performance | Memory Dangerously Low Recently | https://www.BrentOzar.com/go/memhistory | 270 |
2930
| 1 | Reliability | Evaluation Edition | https://www.BrentOzar.com/go/workgroup | 229 |
3031
| 1 | Reliability | Last good DBCC CHECKDB over 2 weeks old | https://www.BrentOzar.com/go/checkdb | 68 |
3132
| 1 | Security | Dangerous Service Account | https://vladdba.com/SQLServerSvcAccount | 258 |

sp_Blitz.sql

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3936,6 +3936,38 @@ AS
39363936
AND SUM([wait_time_ms]) > 60000;
39373937
END;
39383938

3939+
IF NOT EXISTS ( SELECT 1
3940+
FROM #SkipChecks
3941+
WHERE DatabaseName IS NULL AND CheckID = 270 )
3942+
AND EXISTS (SELECT * FROM sys.all_objects WHERE name = 'dm_os_memory_health_history')
3943+
BEGIN
3944+
3945+
IF @Debug IN (1, 2) RAISERROR('Running CheckId [%d].', 0, 1, 270) WITH NOWAIT;
3946+
3947+
INSERT INTO #BlitzResults
3948+
( CheckID ,
3949+
Priority ,
3950+
FindingsGroup ,
3951+
Finding ,
3952+
URL ,
3953+
Details
3954+
)
3955+
SELECT 270 AS CheckID ,
3956+
1 AS Priority ,
3957+
'Performance' AS FindingGroup ,
3958+
'Memory Dangerous Low Recently' AS Finding ,
3959+
'https://www.brentozar.com/go/memhist' AS URL ,
3960+
CAST(SUM(1) AS NVARCHAR(10)) + N' instances of ' + CAST(severity_level_desc AS NVARCHAR(100))
3961+
+ N' severity level memory issues reported in the last 4 hours in sys.dm_os_memory_health_history.'
3962+
FROM sys.dm_os_memory_health_history
3963+
WHERE severity_level > 1
3964+
GROUP BY severity_level, severity_level_desc;
3965+
END;
3966+
3967+
3968+
3969+
3970+
39393971
IF NOT EXISTS ( SELECT 1
39403972
FROM #SkipChecks
39413973
WHERE DatabaseName IS NULL AND CheckID = 121 )

0 commit comments

Comments
 (0)