sp_whoisactive

Be Prepared: Collecting Data from sp_WhoIsActive in a Table

I am a fangirl of Adam Machanic‘s free sp_whoisactive stored procedure. One of the great things about sp_whoisactive is that it’s very quick to generate a table to collect the data you need, then run the procedure in a loop with a wait statement to regularly collect the data you want over an interval. What’s sp_WhoIsActive? Sp_whoisactive is a procedure written by Adam Machanic. It can be found at http://whoisactive.com/downloads/ What to Do Today Do your future self a favor: Today, set yourself up the following: Create the sp_whoisactive stored procedure in a user database you use only for administration Play with the script I provide below and look at the  parameters of the stored procedure Save a script which creates a table for your preferred version of sp_whoisactive, then runs in a loop to store the data. Why Do This? Even if you’re already running monitoring tools, using sp_whoisactive to…
Read More
Menu