Shotgunning
I know there’s been a lot of blog content about the creation of and updates to my stored procedures lately. I try to consolidate as much as possible, but this one comes from Valued Contributor©.
The one, the only, the Canadian: Michael J Swart (b|t) recently contributed a really cool piece of code that I’ve been dying to have since I created sp_HumanEventsBlockViewer: the entire blocking chain is visualized in the results.
You don’t have to do anything special to see it, just run the procedure with the updated code, and off we go!
EXEC dbo.sp_HumanEventsBlockViewer
@session_name = N'insert an extended event capturing the blocked process report here please and thanks';
You’ll see a new column in the results that looks like this:

This will make troubleshooting long blocking chains a lot easier.
Thanks for reading!
Going Further
If this is the kind of SQL Server stuff you love learning about, you’ll love my training. Blog readers get 25% off the Everything Bundle — over 100 hours of performance tuning content. Need hands-on help? I offer consulting engagements from targeted investigations to ongoing retainers. Want a quick sanity check before committing to a full engagement? Schedule a call — no commitment required.
I’ve used his block viewer in the past and it rocks. Putting it inside this is very welcome.
Quite remarkable 🧐