Quantcast
Channel: Symantec Connect - ブログエントリ
Viewing all articles
Browse latest Browse all 5094

SP_WhoIsActive

$
0
0

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


Viewing all articles
Browse latest Browse all 5094

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>