<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>SQL Server Sleuth &#187; troubleshooting</title>
	<atom:link href="http://sqlserversleuth.com/tag/troubleshooting/feed/" rel="self" type="application/rss+xml" />
	<link>http://sqlserversleuth.com</link>
	<description>For DBAs that enjoy a good mystery</description>
	<lastBuildDate>Sat, 01 Oct 2011 06:04:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sqlserversleuth.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/a9ab64e4b3cc6d92ec2c225a7d6ea0bd?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>SQL Server Sleuth &#187; troubleshooting</title>
		<link>http://sqlserversleuth.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sqlserversleuth.com/osd.xml" title="SQL Server Sleuth" />
	<atom:link rel='hub' href='http://sqlserversleuth.com/?pushpress=hub'/>
		<item>
		<title>Looking Back on My PASS Presentation</title>
		<link>http://sqlserversleuth.com/2009/11/05/looking-back-on-my-pass-presentation/</link>
		<comments>http://sqlserversleuth.com/2009/11/05/looking-back-on-my-pass-presentation/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 06:20:48 +0000</pubDate>
		<dc:creator>tnbarkhouse</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[speaking]]></category>
		<category><![CDATA[SQLDiag]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[webcasts]]></category>

		<guid isPermaLink="false">http://sqlserversleuth.com/?p=182</guid>
		<description><![CDATA[I delivered my &#34;Leveraging PSSDiag/SQLDiag for Efficient Troubleshooting&#34; presentation yesterday morning, here at the PASS Community Summit 2009 conference in Seattle, Washington. The talk went quite well&#x2014;I had fun and felt like there was good interaction with the audience (including &#8230; <a href="http://sqlserversleuth.com/2009/11/05/looking-back-on-my-pass-presentation/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqlserversleuth.com&amp;blog=6775699&amp;post=182&amp;subd=tnbarkhouse&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I delivered my &quot;<a href="/technical-presentations/#SQLDiag" target="_blank">Leveraging PSSDiag/SQLDiag for Efficient Troubleshooting</a>&quot; presentation yesterday morning, here at the <a href="http://summit2009.sqlpass.org/" target="_blank">PASS Community Summit 2009</a> conference in <a href="http://en.wikipedia.org/wiki/Seattle" target="_blank">Seattle, Washington</a>.  The talk went quite well&#x2014;I had fun and felt like there was good interaction with the audience (including many questions during and after the talk).  I also have a great sense of relief now that the presentation is complete!</p>
<p>Based on the great <a href="/2009/10/31/a-successful-rehearsal-and-upcoming-improvements-to-the-presentation/" target="_blank">feedback</a> that I received from my several public <a href="/2009/10/12/speaking-at-the-october-gfwssug-and-ntssug-meetings/" target="_blank">presentations</a> and <a href="/2009/10/29/last-minute-rehearsal/" target="_blank">rehearsals</a>, I made major changes to the talk over the last few days.  I removed most of the material from the introduction and troubleshooting methodology sections, so that I could get to the demonstrations (and eye-candy) as quickly as possible.  The edits made a big difference; I didn&#8217;t bore or overwhelm the audience with too much conceptual material, plus I didn&#8217;t have to race through the case study and demonstrations.</p>
<p>Here are a few highlights or observations:</p>
<ul>
<li>Prior to the start of the session, my friend Tim Mitchell (<a href="http://www.timmitchell.net/" target="_blank">blog</a>, <a href="http://twitter.com/Tim_Mitchell" target="_blank">Twitter</a>) made a special point to come encourage me and offer any assistance that might be needed&#8230; even though he had another session to attend!</li>
<li>I also appreciated the support of my friend Patrick LeBlanc (<a href="http://www.sqlservercentral.com/blogs/sqldownsouth/" target="_blank">blog</a>, <a href="http://twitter.com/patrickdba" target="_blank">Twitter</a>), who was in the audience</li>
<li>There was a very good turnout, far larger than I expected.  I printed out fifty copies of each handout but there were not enough to go around.  I didn&#8217;t have a chance to get an exact count, but I would estimate that about seventy-five people were present!</li>
<li>I had a problem with one of the demonstrations (creating a <a href="http://msdn.microsoft.com/en-us/library/ms189237.aspx" target="_blank">SQL Server Agent</a> <a href="http://msdn.microsoft.com/en-us/library/ms191508.aspx" target="_blank">alert</a> for launching <a href="http://msdn.microsoft.com/en-us/library/ms162833.aspx" target="_blank">SQLDiag</a>).  I developed it against a default instance but was demonstrating it against a named instance, so the <a href="http://technet.microsoft.com/en-us/library/cc779960(WS.10).aspx" target="_blank">performance object</a> name was wrong.  Fortunately the audience was helpful in fixing the problem</li>
<li>I was actually working on addressing this problem on the flights to Seattle (by retrieving the appropriate name from the <span style="white-space:nowrap;"><a href="http://msdn.microsoft.com/en-us/library/ms187743.aspx" target="_blank">[sys].[dm_os_performance_counters]</a></span> <a href="http://msdn.microsoft.com/en-us/library/ms188754.aspx" target="_blank">DMV</a>), but I neglected to finish it after getting here.  It will be fixed before I post the code</li>
<li>My other gaffe was that, early on, I decided to walk down and in front of the dais to be closer to the audience.  I got over to the stairs before realizing that this just wasn&#8217;t a good idea and turned back.  I&#8217;m sure that it looked awkward (and amusing)</li>
<li>Because of the restructuring, I was able to stop and solicit questions at several key points, which helped to draw the audience into the talk</li>
<li>I got to use &quot;<a href="http://www.sqlskills.com/BLOGS/KIMBERLY/post/RunAsRadio-Interview-about-Developers-and-DBAs-whose-job-is-it.aspx" target="_blank">it depends</a>&quot; to answer one of the questions! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>Tim Mitchell also slipped in at one point to snap a picture of me talking.  I brought my camera to the session, but forgot to ask for a volunteer to use it, so I was pleasantly surprised by his thoughtfulness</li>
<li>I didn&#8217;t end up having time to cover the &quot;&#8217;Strategies&#8217; to Avoid&quot; slide.  I&#8217;ll write a blog post that explains the terms</li>
<li>I only had time to cover a fraction of the original material&#8230; I could teach a full-day on this topic!  It&#8217;s going to be important to publish quite a few blog posts to supplement the material</li>
<li>Still, my main goal was realized: I managed to introduce many people to these invaluable, free tools that Microsoft&#8217;s engineers have developed (specifically <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;830232" target="_blank">PSSDiag</a>, SQLDiag, <a href="http://pal.codeplex.com/" target="_blank">PAL</a>, <a href="http://sqlnexus.codeplex.com/" target="_blank">SQL Nexus</a>, and the <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;944837" target="_blank">RML Utilities</a>)</li>
<li>I hope to hear from many audience members as they have a chance to start experimenting with these tools and leveraging them at work</li>
<li>There was a really good group that stayed around after the talk to ask questions</li>
<li>While answering those questions, the lamp in the projector blew out.  I was very fortunate that it waited until after my presentation ended!</li>
<li>Tim Benninghoff (<a href="http://vsteamsystemcentral.com/cs21/blogs/timbenninghoff/default.aspx" target="_blank">blog</a>, <a href="http://twitter.com/Bugboi" target="_blank">Twitter</a>) came up and introduced himself.  We have interacted a bit on <a href="__TODO__" target="_blank">Twitter</a> and I helped him with a PowerShell script back in May.  This was great, since he was on my list of people that I was hoping to meet at the PASS conference!</li>
<li>Only one person was playing <a href="/2009/10/31/im-a-bingo-square-too/" target="_blank">#SQLBingo</a>, which was a little disappointing!</li>
<li>I have spoken to both Colin Stasiuk (<a href="http://benchmarkitconsulting.com/" target="_blank">blog</a>, <a href="http://twitter.com/BenchmarkIT" target="_blank">Twitter</a>) and Greg Larsen (<a href="http://www.sqlserverexamples.com/v2/Blogs/tabid/205/Default.aspx" target="_blank">blog</a>, <a href="http://twitter.com/GregoryLarsen" target="_blank">Twitter</a>) about delivering the talk as a webcast for their user groups (the <a href="http://edmpass.com/" target="_blank">Edmonton</a> and <a href="http://dba.sqlpass.org/" target="_blank">Database Administration virtual</a> chapters, respectively)</li>
<ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tnbarkhouse.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tnbarkhouse.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tnbarkhouse.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tnbarkhouse.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tnbarkhouse.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tnbarkhouse.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tnbarkhouse.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tnbarkhouse.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tnbarkhouse.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tnbarkhouse.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tnbarkhouse.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tnbarkhouse.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tnbarkhouse.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tnbarkhouse.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqlserversleuth.com&amp;blog=6775699&amp;post=182&amp;subd=tnbarkhouse&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqlserversleuth.com/2009/11/05/looking-back-on-my-pass-presentation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a662186ae400e1e95ffca05d7b474fd7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tnbarkhouse</media:title>
		</media:content>
	</item>
		<item>
		<title>My First Forum Contribution</title>
		<link>http://sqlserversleuth.com/2009/10/12/my-first-forum-contribution/</link>
		<comments>http://sqlserversleuth.com/2009/10/12/my-first-forum-contribution/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 00:26:07 +0000</pubDate>
		<dc:creator>tnbarkhouse</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[deadlocks]]></category>
		<category><![CDATA[forums]]></category>
		<category><![CDATA[giving back]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[SQLSaturday]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://sqlserversleuth.com/?p=131</guid>
		<description><![CDATA[NOTE: This post was composed on an airplane on 2009-10-11. As I&#8217;ve mentioned, a goal for the year has been to begin participating in technical forums, answering questions for other IT professionals and developers. I set up a few accounts/profiles &#8230; <a href="http://sqlserversleuth.com/2009/10/12/my-first-forum-contribution/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqlserversleuth.com&amp;blog=6775699&amp;post=131&amp;subd=tnbarkhouse&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:smaller;font-style:italic;">NOTE: This post was composed on an airplane on 2009-10-11.</span></p>
<p>As I&#8217;ve <a href="/2009/10/02/taking-stock-of-my-goals-for-the-year/" target="_blank">mentioned</a>, a goal for the year has been to begin participating in technical <a href="http://en.wikipedia.org/wiki/Internet_forum" target="_blank">forums</a>, answering questions for other <a href="http://en.wikipedia.org/wiki/Information_technology" target="_blank">IT</a> professionals and developers.  I <a href="/2009/10/03/ready-to-get-my-forum-on/" target="_blank">set up</a> a few accounts/profiles last weekend and resolved to answer at least one thread over the course of the week.  It was a busy week!</p>
<p>Well, last night Tim (<a href="http://wonkycoder.wordpress.com/" target="_blank">blog</a>, <a href="http://twitter.com/TimCost" target="_blank">Twitter</a>) and I left the <a href="http://sqlsaturday.com/eventhome.aspx?eventid=26" target="_blank">SQLSaturday #25</a> <a href="http://en.wikipedia.org/wiki/Afterparty" target="_blank">afterparty</a> some time between 7:30 and 8:00 p.m.  We were having a great time, but the weariness from traveling and the lack of sleep was catching up with me.</p>
<p>We got back to the hotel, relaxed briefly, then broke out the laptops.  Tim planned to download <a href="http://www.tableausoftware.com/learning/training/ondemand" target="_blank">videos</a> about the <a href="http://www.tableausoftware.com/" target="_blank">Tableau product suite</a>, a very impressive &quot;visual analysis and data visualization&quot; tool that had been demonstrated during the conference, for the flight home.  I planned to continue working on my <a href="/technical-presentations/#SQLDiag" target="_blank">SQLDiag</a> presentation and hopefully compose a blog post or two as well.</p>
<p>Instead, we got caught up in discussion, visiting such varied topics as: SQLSaturday #25, <a href="http://sqlsaturday.com/eventhome.aspx?eventid=21" target="_blank">SQLSaturday #17</a>, the North Texas <a href="http://sqlsaturday.com/" target="_blank">SQLSaturday</a> (that is being planned), the <a href="http://northtexas.sqlpass.org/AboutUs/tabid/241/Default.aspx" target="_blank">NTSSUG</a> leadership, presentation styles, career goals, marriage, books, friendships, our jobs, the folly of youth (specifically not applying ourselves in school), and our mutual admiration for Tim Mitchell (<a href="http://www.timmitchell.net/" target="_blank">blog</a>, <a href="http://twitter.com/Tim_Mitchell" target="_blank">Twitter</a>).  It was a lot of fun!</p>
<p>A little after 11:00 p.m. (I think), I suddenly remembered my forum-post-for-the-week-of-October-4th goal, which hadn&#8217;t been achieved.  I decided not to let it slip, so I took action.</p>
<p>First, I needed to find a good <a href="http://en.wikipedia.org/wiki/Threaded_discussion" target="_blank">thread</a> to which I could contribute.  I brought up the <a href="http://serverfault.com/" target="_blank">ServerFault</a>, <a href="http://www.sqlservercentral.com/" target="_blank">SQL Server Central</a>, and <a href="http://social.technet.microsoft.com/Forums/en-us/categories" target="_blank">TechNet</a> forums in different browser windows and began searching.  I wasn&#8217;t quite sure the best way to conduct the search, so I started by only including threads that hadn&#8217;t been answered yet.  I skimmed through the remaining post titles and saw a few about <a href="http://msdn.microsoft.com/en-us/library/ms177433.aspx" target="_blank">deadlocks</a>.  I quickly latched onto that topic and refined my search.  Moments later, I found my target: &quot;<a href="http://www.sqlservercentral.com/Forums/Topic642330-146-1.aspx" target="_blank">how to analyse deadlock graph and deadlock xml ?</a>&quot; [sic].</p>
<p>One of the suggestions in my <a href="/technical-presentations/#Deadlocks" target="_blank">deadlocks presentation</a> is to <a href="http://en.wikipedia.org/wiki/Sanitization_(classified_information)" target="_blank">sanitize</a> the <a href="http://sqlinthewild.co.za/index.php/2008/09/16/deadlock-graphs/" target="_blank">deadlock graph</a> and then reach out to the SQL Server community (by way of forum of <a href="http://en.wikipedia.org/wiki/Usenet_newsgroup" target="_blank">newsgroup</a>) or send the graph to a colleague for help (at least until attaining proficiency with <a href="http://blogs.msdn.com/bartd/archive/2006/09/09/Deadlock-Troubleshooting_2C00_-Part-1.aspx" target="_blank">deadlock troubleshooting</a>), so this was a great fit.</p>
<p>I copied the deadlock graph&#8217;s XML content from the forum post into a text file and then changed the extension of the file from &quot;txt&quot; to &quot;<a href="http://msdn.microsoft.com/en-us/library/ms187021.aspx" target="_blank">XDL</a>.&quot;  Doing so made it so that <a href="http://msdn.microsoft.com/en-us/library/ms174173.aspx" target="_blank">SQL Server Management Studio</a> would automatically open the deadlock graph and render a diagram of the deadlock.  I also reformatted the XML contents so that it was easier to read.</p>
<p>I figured out the reason for the deadlock (as much as one can without access to the system and/or schema) pretty quickly, but the write-up took quite a while.  I wanted to include enough information and references that the poster would learn from the answer, and not just take it and be no better off in the future.</p>
<p>Unfortunately it was past midnight by the time that I posted the answer, which meant that I hadn&#8217;t <span style="font-style:italic;font-weight:bold;">technically</span> met my goal of posting an answer during the week of October 4th.  However, I have <a href="http://en.wikipedia.org/wiki/Rationalization_(psychology)" target="_blank">rationalized</a> that I <span style="font-style:italic;font-weight:bold;">did</span> reach my goal, as it was still before midnight in the <a href="http://en.wikipedia.org/wiki/Central_Time_Zone_(Americas)" target="_blank">Central Time Zone</a> (in which the goal has been set). <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   Cheap?  Yes&#8230; but I&#8217;m still happy with it!</p>
<p>I plan to answer at least two forum questions this week.</p>
<p>Now for the <a href="http://en.wikipedia.org/wiki/Punch_line" target="_blank">punch line</a>: The thread that I answered was posted on January 23rd<a href="#PostScript01">*</a>, so my effort probably has little-to-no value for <a href="http://www.sqlservercentral.com/Forums/UserInfo668055.aspx" target="_blank">Anjali Vishwakarma</a>!  I&#8217;ll chalk that up to being a forum <a href="http://en.wikipedia.org/wiki/Newbie" target="_blank">newbie</a>.  Tim tells me that this behavior has its own, very fitting and humorous <a href="http://serverfault.com/badges/17/necromancer" target="_blank">term</a> on ServerFault/<a href="http://stackoverflow.com/" target="_blank">StackOverflow</a>.  Hopefully the answer will be useful to somebody else, in the future, when they are researching deadlocks.</p>
<p></p>
<p><a name="PostScript01">*</a>   I noticed the dates in the deadlock graph, thought that it was strange that the poster needed help with a deadlock from so long ago, but failed to make the connection that I was dealing with a long-forgotten thread.  Remember that I said I was sleep deprived. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tnbarkhouse.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tnbarkhouse.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tnbarkhouse.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tnbarkhouse.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tnbarkhouse.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tnbarkhouse.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tnbarkhouse.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tnbarkhouse.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tnbarkhouse.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tnbarkhouse.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tnbarkhouse.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tnbarkhouse.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tnbarkhouse.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tnbarkhouse.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqlserversleuth.com&amp;blog=6775699&amp;post=131&amp;subd=tnbarkhouse&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqlserversleuth.com/2009/10/12/my-first-forum-contribution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a662186ae400e1e95ffca05d7b474fd7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tnbarkhouse</media:title>
		</media:content>
	</item>
		<item>
		<title>A solution of my very own</title>
		<link>http://sqlserversleuth.com/2009/04/13/a-solution-of-my-very-own/</link>
		<comments>http://sqlserversleuth.com/2009/04/13/a-solution-of-my-very-own/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 21:20:31 +0000</pubDate>
		<dc:creator>tnbarkhouse</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[escalation calls]]></category>
		<category><![CDATA[pitfalls]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://tnbarkhouse.wordpress.com/?p=13</guid>
		<description><![CDATA[Typically, when I&#8217;m faced with a SQL Server problem, I perform research until I discover a solution. I have many sources for research&#8230; here are a few (and the order that I typically follow) for troubleshooting specific error codes and &#8230; <a href="http://sqlserversleuth.com/2009/04/13/a-solution-of-my-very-own/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqlserversleuth.com&amp;blog=6775699&amp;post=13&amp;subd=tnbarkhouse&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Typically, when I&#8217;m faced with a SQL Server problem, I perform research until I discover a solution.  I have many sources for research&#8230; here are a few (and the order that I typically follow) for troubleshooting specific error codes and messages:</p>
<ol>
<li><a href="http://msdn.microsoft.com/en-us/library/aa260433(SQL.80).aspx" target="_blank">[master].[dbo].[sysmessages]</a> (SQL Server 2000) or <a href="http://msdn.microsoft.com/en-us/library/ms187382.aspx" target="_blank">[master].[sys].[messages]</a> (SQL Server 2005 and later)</li>
<li>The <a href="http://support.microsoft.com/" target="_blank">Microsoft Knowledge Base</a></li>
<li>Books Online: <a href="http://msdn.microsoft.com/en-us/library/aa256841(SQL.80).aspx" target="_blank">SQL Server 2000</a>, <a href="http://msdn.microsoft.com/en-us/library/ms166019(SQL.90).aspx" target="_blank">SQL Server 2005</a>, or <a href="http://msdn.microsoft.com/en-us/library/ms130214.aspx" target="_blank">SQL Server 2008</a></li>
<li><a href="http://www.google.com/" target="_blank">Search engine</a></li>
<li><a href="http://groups.google.com/" target="_blank">Newsgroups</a> and forums</li>
<li>Any of several colleagues</li>
</ol>
<p>Regardless of the source, I submit query after query and constantly refine my search terms.  After sifting through enough results I will have the answer.  Sometimes it&#8217;s presented to me in complete form, other times I must synthesize the solution from several partial answers.  I have been remarkably successful as a DBA just from honing my research skills.</p>
<p>As my knowledge of SQL Server deepens, there have been those rare occasions in which I come up with an answer of my own.  An escalation call on Saturday led to such an occurrence.</p>
<p><span style="font-style:italic;">NOTE: This escalation call dealt with a SQL Server 2000 instance, so that is the version that I&#8217;ll be targeting with the various links.</span></p>
<p>A customer had rebuilt <span style="font-weight:bold;">all</span> of the indexes in a ~300 gigabyte database and then they were surprised when the data files grew.  One of the data files had doubled in size but was only using half of the space.  This was leading to free space alerts on the volume hosting a few data files (the alert threshold was 15% and the growth resulted in only 8% free space on the drive).  The customer requested that we shrink the files.</p>
<p>I&#8217;m not going to get into the many reasons that free space in a data file is beneficial or the many <a href="http://sqlserverpedia.com/wiki/Shrinking_Databases" target="_blank">issues</a> with shrinking data files.</p>
<p>I decided to start by running <a href="http://msdn.microsoft.com/en-us/library/aa258824(SQL.80).aspx" target="_blank">DBCC SHRINKFILE</a> with the TRUNCATEONLY argument.  I received error <a href="http://msdn.microsoft.com/en-us/library/aa937589(SQL.80).aspx" target="_blank">3140</a>: &#8220;Could not adjust the space allocation for file &#8216;%ls&#8217;.&#8221;</p>
<p>As usual, I began to research the error message using the above-mentioned resources.  I found many people asking about the issue, but the best <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;254253" target="_blank">answer</a> applied only to SQL Server 7.0.</p>
<p>I&#8217;m not sure why, but I decided to stop researching and try to figure it out myself.  Since the error message relates to space allocation, I decided to run <a href="http://msdn.microsoft.com/en-us/library/aa258809(SQL.80).aspx" target="_blank">DBCC CHECKALLOC</a>.  The command finished quite quickly with &#8220;CHECKALLOC found 0 allocation errors and 0 consistency errors in database &#8216;RedactedDatabaseName&#8217;.&#8221; at the end of the output.  I considered running the full-blown <a href="http://msdn.microsoft.com/en-us/library/aa258278(SQL.80).aspx" target="_blank">DBCC CHECKDB</a> when I had an idea&#8230; what if the problem was a variation on the SQL Server 7.0 <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;254253" target="_blank">bug</a> that was still present in SQL Server 2000?  Since the known bug related to index allocation discrepancies, I wondered if running <a href="http://msdn.microsoft.com/en-us/library/aa258283(SQL.80).aspx" target="_blank">DBCC UPDATEUSAGE</a> would help.  Other than the somewhat trivial server resources that it would take to report and correct inaccuracies in the <a href="http://msdn.microsoft.com/en-us/library/aa260413(SQL.80).aspx" target="_blank">[master].[dbo].[sysindexes]</a> table, it couldn&#8217;t hurt, right?  So I gave it a try.  DBCC UPDATEUSAGE took eight minutes and twenty-one seconds to run and made 238 corrections.  A subsequent execution of the DBCC SHRINKFILE command (with the TRUNCATEONLY argument) finished in six seconds and returned 5.72 gigabytes to the file system.  My hunch paid off.</p>
<p>It was my own understanding of indexes and experience with the DBCC UPDATEUSAGE command that ultimately provided the solution to this problem!  It&#8217;s so gratifying when answers come as much from me as any other source&#8211;a situation that grows more common all the time.</p>
<p>As far as the escalation call, I wrote an email to the customer and laid out five reasons not to shrink the file any further.  The customer agreed and the disk space threshold is being changed from 15% down to 10% (which is perfectly reasonable in this case).</p>
<p>Finally, two <a href="http://en.wikipedia.org/wiki/Public_service_announcement" target="_blank">PSAs</a>:</p>
<ul>
<li>Please consult an experienced database professional before implementing widespread index maintenance.  Index maintenance is <span style="font-weight:bold;">very important</span> but it is also costly and can lead to disk space issues (data file and transaction log growth).  Improper <a href="http://msdn.microsoft.com/en-us/library/aa933139(SQL.80).aspx" target="_blank">fill factor</a> values for your workload may actually make performance worse.</li>
<li>Please consult an experienced database professional for database file capacity planning.  In a well designed/managed system autogrow should not occur (being a <a href="http://sqlserverpedia.com/blog/database-design/i-keep-reading-about-the-dangers-autogrow-but-can-i-really-size-the-database-accurately-enough-to-disable-it/" target="_blank">fail-safe mechanism</a> only) and files should not be shrunk.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tnbarkhouse.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tnbarkhouse.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tnbarkhouse.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tnbarkhouse.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tnbarkhouse.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tnbarkhouse.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tnbarkhouse.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tnbarkhouse.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tnbarkhouse.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tnbarkhouse.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tnbarkhouse.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tnbarkhouse.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tnbarkhouse.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tnbarkhouse.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqlserversleuth.com&amp;blog=6775699&amp;post=13&amp;subd=tnbarkhouse&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqlserversleuth.com/2009/04/13/a-solution-of-my-very-own/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a662186ae400e1e95ffca05d7b474fd7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tnbarkhouse</media:title>
		</media:content>
	</item>
	</channel>
</rss>
