Asset Management Suite

 View Only

SP_WhoIsActive 

Jul 31, 2013 01:34 PM

I came across a stored procedure that is quite popular for troubleshooting SQL especially blocking, it's not new but deserves a repost. I tried it against sp_who and sp_who2. It seems that this SP gives a more instant snapshot in better detail. Probably it's best feature is a clickable link to the transact that is running. I could still see block chains better with sp_who2, as you could see the trail of SPID's better. There is a SQL query for finding the lead blocker at http://sqlserverplanet.com/troubleshooting/blocking-processes-lead-blocker

For those that are interested in what the differences are between sp_who and sp_who2, the screen snip below shows the column differences, the hidden difference is that sp_who is documented and thus supported, otherwise they are very similar. SP_WhoIsActive complements them.

Disclaimer

None of this is my work, this has been shared by the author Adam Machanic at http://sqlblog.com/files/folders/release/entry35240.aspx. Please refer to his site for firther information.

How to

Execute the attached SQL to create the stored procedure then execute "sp_whoisactive" as below.

who.JPG

Statistics
0 Favorited
0 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
zip file
who_is_active_v11_00.zip   26 KB   1 version
Uploaded - Apr 10, 2020

Tags and Keywords

Related Entries and Links

No Related Resource entered.