sp_BlitzLock: replace deprecated sp_BlitzQueryStore call with sp_QuickieStore - #4017
Conversation
…kieStore Fixes #4010. Check 8's "More Info - Query" finding for stored-procedure deadlocks used to emit an EXECUTE sp_BlitzQueryStore call - that proc is deprecated and no longer maintained. Per the issue discussion the right replacement is Erik Darling's sp_QuickieStore (https://erikdarling.com/sp_quickiestore/), which has the same shape: a Query Store explorer keyed by database + procedure name. Mapping: sp_BlitzQueryStore @DatabaseName -> sp_QuickieStore @database_name sp_BlitzQueryStore @StoredProcName -> sp_QuickieStore @procedure_name The Query Store availability guard (@ProductVersionMajor >= 13 OR @Azure = 1) stays - sp_QuickieStore also requires Query Store, which is SQL 2016+. Also updated: - the section comment at line 2809 - the debug RAISERROR message at line 2894 so future readers don't see stale "BlitzQueryStore" references. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates sp_BlitzLock Check 8 “More Info - Query” output to stop emitting calls to the deprecated sp_BlitzQueryStore and instead emit equivalent sp_QuickieStore calls (per #4010), keeping the existing Query Store version/Azure guard in place.
Changes:
- Replaced the generated “More Info - Query” command from
EXECUTE sp_BlitzQueryStore ...toEXECUTE sp_QuickieStore ...with mapped parameter names. - Updated the Check 8 section comment and debug
RAISERRORtext to referencesp_QuickieStore. - Added an inline comment noting
sp_QuickieStoreis an external dependency and thatsp_BlitzQueryStoreis deprecated.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| N'@DatabaseName = ' + | ||
| N'EXECUTE sp_QuickieStore ' + | ||
| N'@database_name = ' + | ||
| QUOTENAME(ds.database_name, N'''') + |
There was a problem hiding this comment.
Good catch - fixed in the latest commit on this branch. Switched the source from ds.database_name (PARSENAME of proc_name, which is NULL whenever the stack frame isn't 3-part) to dow.database_name (derived from database_id at deadlock-capture time). Same source the SELECT already uses 4 lines up for the output's database_name column, so no new dependencies.
Copilot review on PR #4017 flagged that ds.database_name comes from PARSENAME(ds.proc_name, 3), which returns NULL whenever the proc_name isn't a 3-part identifier. QUOTENAME(NULL, '''') propagates NULL through the rest of the string concat, so the entire finding becomes NULL and the user gets nothing to copy/paste. Switched to dow.database_name (derived from dow.database_id at deadlock-capture time, already used 4 lines up for the output's database_name column). Same data, more reliable source, stays consistent with the rest of the SELECT. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fixes #4010.
Summary
Check 8 in sp_BlitzLock emits a "More Info - Query" finding for every stored procedure that appears in a deadlock stack. That finding used to be an
EXECUTE sp_BlitzQueryStorecall — a proc that's been deprecated. Replaced with Erik Darling's sp_QuickieStore, which serves the same purpose (Query Store explorer keyed by database + procedure name) per the discussion on the issue.Mapping
@DatabaseName@database_name@StoredProcName@procedure_nameConfirmed param names from the canonical source at https://github.com/erikdarlingdata/DarlingData/blob/main/sp_QuickieStore/sp_QuickieStore.sql.
Other touch-ups in the same block
sp_QuickieStoreinstead ofBlitzQueryStore.RAISERRORmessage ("Check 8 more info part 2 …") matches.finding =block explains that sp_QuickieStore is an external Erik Darling tool the user installs separately, and notes that sp_BlitzQueryStore (its predecessor) is deprecated — so a future maintainer doesn't wonder where the old call went.What stays the same
IF (@ProductVersionMajor >= 13 OR @Azure = 1)guard. sp_QuickieStore also requires Query Store (SQL 2016+), so the same gate applies.Test plan
EXECUTE sp_QuickieStore @database_name = '…', @procedure_name = '…';for each proc in the stack.🤖 Generated with Claude Code