Thursday, July 12, 2012

SQL Server DBA Tool Kit

Right next to my batarang and bat-zip-line-hook-shooter-gun on my utility belt is my SQL Server DBA Tool Kit, full of scripts I've picked up along the way.

I take little credit for some of these, as I've picked them up from various sources.  I have modified them, for example, adding the ability to see the cached execution plan to MS PSS's "worst queries" query, or adding a blocking chain and cached execution plan to the typical dm_exec_sessions and dm_exec_requests queries out there to replace sp_who2.

There are some of my handwritten queries in there, for example the query to find the largest objects in the database and their compression state, a proof of sql_modules vs INFORMATION_SCHEMA.routines, and the "sessions and requests" with blocking chain query that I've presented on before and use daily.  Nothing novel or ground-breaking, but real practical utility queries I use personally as a SQL Server consultant.

I presented my toolkit last night to the Baton Rouge SQL Server User Group and it turned out to be one of our best meetings in a while - over an hour of solid, experience-based conversation about queries, best practices, example experiences that was a wealth of information.  Thanks to everyone who attended and helped make it a great meeting - it certainly wasn't all me and my fancy tool kit.

You can view my SQL toolbox on Github.


EDIT: 20140813 Updated toolbox link.
EDIT: 20140929 Updated toolbox link.
EDIT: 20170830 Updated toolbox link to include Github.

1 comment:

  1. Thanks for this, William. Very nice collection of scripts to add to the thumbdrive.
    Jeff Bennett
    St. Louis, MO

    ReplyDelete

All comments are moderated before publishing. If you find something wrong or disagree, please comment so that this blog can be as accurate and helpful as possible.