From b49a00f14f1d33b7e7d9becc2394e44a7a54fc58 Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Fri, 13 Nov 2026 08:15:29 -0500 Subject: [PATCH 1/2] sp_HealthParser: @warnings_only filters memory broker rows on SHRINK (#941) The memory broker section tested the broker notification against RESOURCE_MEMPHYSICAL_LOW, a resource monitor value. A broker notification is STABLE, GROW or SHRINK, so with @warnings_only = 1 no broker row could ever be returned, even when SHRINK events existed. Keep a broker row under @warnings_only = 1 only when the notification is SHRINK. The README row and @help text now say so. The resource monitor filter in the memory conditions section is correct and unchanged. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01M98owc3zzZNEpij3p49Bbe --- sp_HealthParser/README.md | 2 +- sp_HealthParser/sp_HealthParser.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sp_HealthParser/README.md b/sp_HealthParser/README.md index 2768b064..b0015b30 100644 --- a/sp_HealthParser/README.md +++ b/sp_HealthParser/README.md @@ -38,7 +38,7 @@ Typical result set will show you: | @what_to_check | varchar | areas of system health to check | all, waits, disk, cpu, memory, system, locking (also accepts wait, blocking, blocks, deadlock, deadlocks, lock, locks) | all | | @start_date | datetimeoffset | earliest date to show data for. A value without an offset (or with +00:00) is server local time, like the output. It is converted to UTC internally | a reasonable date | seven days back | | @end_date | datetimeoffset | latest date to show data for. A value without an offset (or with +00:00) is server local time, like the output. It is converted to UTC internally | a reasonable date | current date | -| @warnings_only | bit | only show rows where a warning or error was reported (the blocked process report is not filtered) | NULL, 0, 1 | 0 | +| @warnings_only | bit | only show rows where a warning or error was reported (the blocked process report is not filtered). Memory broker rows count as a warning only when the notification is SHRINK. | NULL, 0, 1 | 0 | | @database_name | sysname | database name to show blocking events for | the name of a database | NULL | | @wait_duration_ms | bigint | minimum wait duration | the minimum duration of a wait for queries with interesting waits | 500 | | @wait_round_interval_minutes | bigint | interval to round minutes to for wait stats | interval to round minutes to for top wait stats by count and duration | 60 | diff --git a/sp_HealthParser/sp_HealthParser.sql b/sp_HealthParser/sp_HealthParser.sql index ac2c8d05..fb71e9f2 100644 --- a/sp_HealthParser/sp_HealthParser.sql +++ b/sp_HealthParser/sp_HealthParser.sql @@ -107,7 +107,7 @@ BEGIN WHEN N'@what_to_check' THEN N'areas of system health to check' WHEN N'@start_date' THEN N'earliest date to show data for; a value without an offset (or with +00:00) is server local time, like the output; converted to UTC internally' WHEN N'@end_date' THEN N'latest date to show data for; a value without an offset (or with +00:00) is server local time, like the output; converted to UTC internally' - WHEN N'@warnings_only' THEN N'only show rows where a warning or error was reported (the blocked process report is not filtered)' + WHEN N'@warnings_only' THEN N'only show rows where a warning or error was reported (the blocked process report is not filtered). Memory broker rows count as a warning only when the notification is SHRINK' WHEN N'@database_name' THEN N'database name to show blocking events for' WHEN N'@wait_duration_ms' THEN N'minimum wait duration' WHEN N'@wait_round_interval_minutes' THEN N'interval to round minutes to for wait stats' @@ -4024,7 +4024,7 @@ AND ca.utc_timestamp < @end_date'; INTO #memory_broker_info FROM #memory_broker AS mb CROSS APPLY mb.memory_broker.nodes('//event') AS w(x) - WHERE (w.x.exist('(data[@name="notification"]/value[.= "RESOURCE_MEMPHYSICAL_LOW"])') = @warnings_only OR @warnings_only = 0) + WHERE (w.x.exist('(data[@name="notification"]/value[.= "SHRINK"])') = @warnings_only OR @warnings_only = 0) OPTION(RECOMPILE, MAXDOP 1); IF @debug = 1 From 91fad247fbb728b264d85089b04a90dcca08e52e Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Fri, 13 Nov 2026 08:16:33 -0500 Subject: [PATCH 2/2] sp_HealthParser: match @help punctuation for @warnings_only Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01M98owc3zzZNEpij3p49Bbe --- sp_HealthParser/sp_HealthParser.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp_HealthParser/sp_HealthParser.sql b/sp_HealthParser/sp_HealthParser.sql index fb71e9f2..9f98391b 100644 --- a/sp_HealthParser/sp_HealthParser.sql +++ b/sp_HealthParser/sp_HealthParser.sql @@ -107,7 +107,7 @@ BEGIN WHEN N'@what_to_check' THEN N'areas of system health to check' WHEN N'@start_date' THEN N'earliest date to show data for; a value without an offset (or with +00:00) is server local time, like the output; converted to UTC internally' WHEN N'@end_date' THEN N'latest date to show data for; a value without an offset (or with +00:00) is server local time, like the output; converted to UTC internally' - WHEN N'@warnings_only' THEN N'only show rows where a warning or error was reported (the blocked process report is not filtered). Memory broker rows count as a warning only when the notification is SHRINK' + WHEN N'@warnings_only' THEN N'only show rows where a warning or error was reported (the blocked process report is not filtered); memory broker rows count as a warning only when the notification is SHRINK' WHEN N'@database_name' THEN N'database name to show blocking events for' WHEN N'@wait_duration_ms' THEN N'minimum wait duration' WHEN N'@wait_round_interval_minutes' THEN N'interval to round minutes to for wait stats'