Skip to content

Port right-click View Plan to Dashboard blocked process reports + Deadlocks grids (Lite & Dashboard) #880

@erikdarlingdata

Description

@erikdarlingdata

Background

#867 / #868 shipped in v2.8.0 with a right-click context menu on the Lite Blocked Process Reports grid offering View Blocked Plan and View Blocking Plan actions. Plan lookup parses executionStack frames from the BPR XML, filters the 42-byte all-zero sql_handle placeholder, and joins sys.dm_exec_query_stats by sql_handle + statement offsets — matching sp_HumanEventsBlockViewer.

That should ship everywhere, not just Lite + blocked process reports.

Scope

Three surfaces still need the treatment:

  • Dashboard Blocked Process Reports grid — mirror the Lite context menu + lookup path
  • Lite Deadlocks grid — right-click > View Victim Plan / View Deadlocker Plan, lookup against the deadlock graph XML's process nodes (each process has its own sql_handle + executionStack)
  • Dashboard Deadlocks grid — same as Lite deadlocks

Implementation template

  • XAML: Lite/Controls/ServerTab.xamlBlockedProcessContextMenu
  • Handlers: Lite/Controls/ServerTab.xaml.csViewBlockedSidePlan_Click / ViewBlockingSidePlan_Click
  • Lookup: Lite/Services/LocalDataService.QueryStats.csFetchPlanBySqlHandleAsync

Deadlock graphs differ in shape from BPR XML — processes live under <process-list> with sqlhandle, stmtstart, stmtend as attributes, plus an optional <executionStack> child. Parsing can reuse the frame-iteration approach.

Notes

  • Drop "Get Actual Plan" on the deadlock menu for the same reason as BPR — re-executing a mid-transaction query that just deadlocked is a foot-gun.
  • Fall back to a clear "plan no longer in cache" message when sys.dm_exec_query_stats doesn't have the plan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions