<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'Performance', 'monitoring', and 'Scripts'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=Performance,monitoring,Scripts&amp;orTags=0</link><description>Search results matching tags 'Performance', 'monitoring', and 'Scripts'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Who is Active? v9.57: Fast, Comprehensive DMV Collection - What's Really Happening on Your Server?</title><link>http://sqlblog.com/blogs/adam_machanic/archive/2009/12/03/who-is-active-v9-57-fast-comprehensive-dmv-collection.aspx</link><pubDate>Thu, 03 Dec 2009 19:59:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:19489</guid><dc:creator>Adam Machanic</dc:creator><description>
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h1&gt;&lt;a href="http://sqlblog.com/blogs/adam_machanic/archive/2011/04/27/who-is-active-v11-00-a-month-of-activity-monitoring-part-27-of-30.aspx"&gt;&lt;b&gt;UPDATE, April 28 2011: Who is Active v9.57 is outdated. Please use v11.00 instead.&lt;/b&gt;&lt;/a&gt;&lt;/h1&gt;&lt;br&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;hr&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Happy December, SQLblog readers! My gift to you, just in time for the holidays: The newest "official" release of your favorite &lt;b&gt;SQL Server activity monitoring stored procedure&lt;/b&gt;.&lt;span class="status"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlblog.com/files/folders/19491/download.aspx"&gt;&lt;b&gt;Click here to download Who is Active? v9.57&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since the last release--&lt;a href="http://sqlblog.com/blogs/adam_machanic/archive/2009/08/20/who-is-active-v8-82-harder-better-faster-stronger.aspx"&gt;v8.82, from August of this year&lt;/a&gt;--I've made a number of modifications to the script, resulting in six interim "beta" releases. The uniting theme of all of these changes is &lt;b&gt;more, better quality data, faster&lt;/b&gt;. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;More data&lt;/b&gt;. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Two new core options were added at the behest of users: &lt;b&gt;@show_sleeping_spids&lt;/b&gt; and &lt;b&gt;@show_system_spids&lt;/b&gt;. These options cause the procedure to return information that wasn't previously available via Who is Active, about--you guessed it--sleeping and system sessions, respectively. &lt;br&gt;&lt;/li&gt;
&lt;li&gt;Another major change was adding a feature so that &lt;b&gt;the script now shows blocking sessions whether or not they're included in the default filter criteria&lt;/b&gt;. This is not something you turn on or off--it just happens--and will ensure that if you're debugging a blocking scenario you'll automatically have all the information you need. &lt;br&gt;&lt;/li&gt;
&lt;li&gt;And for you query plan geeks out there, the full wait stats collection mode (see the "Faster data" section below) now returns node identifier information with CXPACKET waits--helping you to &lt;b&gt;track progress of tasks as a plan is executed&lt;/b&gt;. &lt;br&gt;&lt;/li&gt;
&lt;li&gt;Finally, a small modification. The online help system (@help=1) now returns information about both the available input parameters as well as all of the available output columns.&lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;Better data&lt;/b&gt;.&lt;b&gt; &lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A few minor &lt;b&gt;bugs were fixed&lt;/b&gt;, mostly &lt;b&gt;having to do with the evils of MARS&lt;/b&gt; and the fact that the DMVs don't properly deal with MARS sessions in many cases. &lt;br&gt;&lt;/li&gt;
&lt;li&gt;Workarounds were also added for inconsistencies in how the DMVs report SQL handles, even without MARS. &lt;br&gt;&lt;/li&gt;
&lt;li&gt;Two features were added to help you get only the data you need when you need it, and not the data you don't:&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Dynamic sort ordering&lt;/b&gt;, via a parameter called @sort_order, lets you pass in a list of columns and column directions by which to sort the output. &lt;br&gt;&lt;/li&gt;
&lt;li&gt;And &lt;b&gt;"not" filters&lt;/b&gt;, implemented using parameters @not_filter and @not_filter_type, work exactly the opposite of regular filters. These are useful in those cases where you have a bunch of sessions that aren't of interest, and you don't want them cluttering your output. &lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Finally, I've &lt;b&gt;changed the default output column order&lt;/b&gt; to something I think is a bit more useful. Don't like my selections? No problem--override me using the @output_column_list parameter.&lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;Faster data&lt;/b&gt;. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This is the area in which I made the most modifications. &lt;b&gt;A monitoring tool borders on useless when it takes a minute or more to return key metrics&lt;/b&gt; when your server is on fire, and alas, previous versions of Who is Active were doing just that for some users. &lt;br&gt;&lt;/li&gt;
&lt;li&gt;I've made major changes to the core queries in this version of Who is Active, &lt;b&gt;bringing down query times from minutes to a few seconds&lt;/b&gt; in many cases. &lt;br&gt;&lt;/li&gt;
&lt;li&gt;In conjunction with these changes I added a new &lt;b&gt;lightweight wait stats collection&lt;/b&gt; mode, which is the new default. This mode collects only the top non-CXPACKET wait, giving preference to blocked waits, so that you can see the worst problems without having to sort through a lot of output that may or may not apply. &lt;br&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;If you miss the complete stats collection mode, it's still there--simply set @get_task_info=2 when calling the procedure.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt;I'm quite happy with this release, and I hope that it will help people quickly solve a number of tricky SQL Server problems. &lt;b&gt;As always, your feedback is very much appreciated!&lt;/b&gt; Leave me a comment here, e-mail me (my address is in the script), or track me down at a conference. Most of the features in the past few versions are a direct result of requests I've gotten from users. &lt;/p&gt;
&lt;p&gt;A &lt;b&gt;huge thank you to those who tested and gave me feedback&lt;/b&gt; since the last version! Aaron Bertrand, Rajiv Jain, Michelle Ufford, Uri Dimant, and everyone else, I really am thankful for your efforts. To these people and all of my readers, &lt;b&gt;I wish you a happy December and a prosperous 2010&lt;/b&gt;. &lt;/p&gt;
&lt;p&gt;Until next time, enjoy!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="http://sqlblog.com/files/folders/19491/download.aspx"&gt;&lt;b&gt;Click here to download Who is Active? v9.57&lt;/b&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please ignore the text below. Putting in it for search purposes.&lt;/p&gt;
&lt;p&gt;sp_whoisactive whoisactive sp_who sp_who2 sp_who3 sp_who4 sp_who5&lt;br&gt;&lt;/p&gt;</description></item><item><title>A Gift of Script for 2009: Who is Active, Redux</title><link>http://sqlblog.com/blogs/adam_machanic/archive/2008/12/31/a-gift-of-script-for-2009-who-is-active-redux.aspx</link><pubDate>Wed, 31 Dec 2008 14:49:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:10841</guid><dc:creator>Adam Machanic</dc:creator><description>&lt;p&gt;Last year on December 31 &lt;a href="http://sqlblog.com/blogs/adam_machanic/archive/2007/12/31/a-gift-of-script-for-2008-who-s-active-what-are-they-doing-and-who-is-blocked.aspx"&gt;I posted part of a larger monitoring script that I had been working on for a few months&lt;/a&gt;. I received lots of great feedback on the little script in both the comments and from people I was working with, and over the course of the last year I estimate that I have invested at least a couple of hundred hours in the script. &lt;a href="http://sqlblog.com/blogs/adam_machanic/attachment/10841.ashx"&gt;The result of all of this time is attached&lt;/a&gt;, and I hope that this script is as useful for others as it has been for me; I've been using it pretty much nonstop while modifying it and it has become an indispensable part of my toolkit. &lt;/p&gt;
&lt;p&gt;Alas, while I had planned to write a comprehensive blog post on the script for publication today, I simply don't have time to do it correctly at the moment--but I wanted to get the script out on the 31st in order to create a kind of tradition. So instead of telling you everything it can do, I will ask that you instead take a look inside the script, where I've done a fairly good job documenting both the parameters and the outputs.&amp;nbsp; I'll do a followup post soon (I hope) and do a better job of telling you about the various options.&amp;nbsp; In the meantime, I'll leave you with a list of the script's major features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Wait stats collection&lt;/b&gt;, if you enable the GET_WAITS switch. This mode aggregates the various resources that the tasks associated with the session are waiting on, and lets you know how long the tasks have been waiting.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Collection of lock information&lt;/b&gt;, if you enable the GET_LOCKS switch. A lot of effort went into this particular feature--all of the locks for each session are aggregated in an XML format, and work is done to map the various identifiers associated with each lock to actual object names so that you don't have to do the footwork yourself.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Information about sleeping SPIDs&lt;/b&gt; holding open transactions, if you enable the GET_TRANSACTION_INFO switch. If you're being blocked by a SPID that is not active, you should be able to find out about it. This option lets you do it.&amp;nbsp; As a bonus, it also pulls information about transaction log writes in any database in which the transaction has done a write.&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Collection of the "outer" command/batch&lt;/b&gt;, if you enable the GET_OUTER_COMMAND switch. One of the comments on the script I posted last year asked why, if you issue SQL like "ALTER TABLE dbo.xx ALTER COLUMN yyy FLOAT NULL", you'll end up with statement text that looks like "UPDATE [zzz].[dbo].[xxx] SET [yyy] = [yyy]". This is an internal representation of what's actually happening, but in many cases is not esepecially useful for end-users. So if you want to see what was actually run, now you can.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Every expensive or potentially expensive option is now parameterized&lt;/b&gt;. I spent a lot of time tweaking performance and with no options running the thing is pretty fast. Enable some options--especially lock collection--and it will slow down considerably, so use these advanced features with care.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Enjoy, and &lt;b&gt;please keep sending feedback&lt;/b&gt;!&amp;nbsp; Let me know what else you would like to see, if you find bugs, etc.&amp;nbsp; I'll post updated versions as major changes are made. &lt;/p&gt;
&lt;p&gt;To finish I would like to thank a few of the people who had an impact on the evolution of this script over the past&amp;nbsp;12 months: Michael Condon, &lt;a href="http://sommarskog.se/"&gt;Erland Sommarskog&lt;/a&gt;, &lt;a href="http://sqlblog.com/blogs/aaron_bertrand/default.aspx"&gt;Aaron Bertrand&lt;/a&gt;, &lt;a href="http://sqlblog.com/blogs/louis_davidson/default.aspx"&gt;Louis Davidson&lt;/a&gt;, and &lt;a href="http://jmkehayias.blogspot.com/"&gt;Jonathan Kehayias&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Have a great 2009, everyone! &lt;br&gt;&lt;/p&gt;</description></item></channel></rss>