T-SQL Tuesday #049: What’re we waitin’ fer?!?!?

What're we waitin' fer?!?!?

What’re we waitin’ fer?!?!?

Had to channel my inner Mickey for the title of the post…Rocky II is one of the first movies that I remembering seeing as a re-run on cable…but I digress.

When I read Robert’s post and subject for this month’s T-SQL Tuesday, my mind immediately went to one of my first experiences with wait stats, as it was a very poignant “ah-HAH!” moment for me.  I was an administrator for several SQL Server instances and had been doing it for a while, but knew very little about SQL Server’s wait stats.  A few nights before my incident I was reading through Jonathan Kehayias’ (B|T) “Troubleshooting SQL Server: A Guide for the Accidental DBA” which has a section devoted to finding and diagnosing issues around waits.  I had saved the supplied queries and was developing a method for saving wait information and analyzing it over time, to help with my administration.tsql2sday

So there I was, at work taking care of whatever that was the radar that day.  Cue my users: emails and phone calls began coming in, telling me that our campus imaging database was unresponsive and that the application was down.  Our monitoring software wasn’t reporting any unusual resource strains on the instance and the other databases weren’t having any problems.  Enter my shiny new query: I ran it and found a wait on BACKUPTHREAD.  It turned out that my hourly backup of the imaging database had hung up…using the very same query I found that I wasn’t having any problems with I/O.  I was unable to kill the backup process and a phone call to Microsoft had me restart the instance.

It was awesome to be able to use something that was pretty fresh in my mind and be able to get to the root of an issue in just a few minutes.  I remember thinking “heck, that was pretty badass.”

Thanks to Robert Davis (B|T) for this month’s topic.

Here’s some more information about T-SQL Tuesdays (#tsql2sday on Twitter)

http://sqlblog.com/blogs/adam_machanic/archive/2009/11/30/invitation-to-participate-in-t-sql-tuesday-001-date-time-tricks.aspx

Bookmark the permalink.

One Response to T-SQL Tuesday #049: What’re we waitin’ fer?!?!?

  1. Job well done, Dan. Thanks for joining in on T-SQL Tuesday #49.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>