Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.
Endpoint Management Community Blog

SP_WhoIsActive

Created: 31 Jul 2013
michael cole's picture
0 0 Votes
Login to vote

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