<?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/"
	>

<channel>
	<title>StraightPath Consulting&#039;s SQL Server Blog &#187; Learn From Mistakes</title>
	<atom:link href="http://www.straightpathsql.com/archives/category/learn-from-mistakes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.straightpathsql.com</link>
	<description>Mike Walsh&#039;s Thoughts on SQL Server, Professional Development and Life</description>
	<lastBuildDate>Thu, 29 Jul 2010 12:11:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Free SQL Training Online &#8211; Wednesday 10/21/09</title>
		<link>http://www.straightpathsql.com/archives/2009/10/free-sql-training-online-wednesday-102109/</link>
		<comments>http://www.straightpathsql.com/archives/2009/10/free-sql-training-online-wednesday-102109/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 19:39:18 +0000</pubDate>
		<dc:creator>Mike Walsh</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Learn From Mistakes]]></category>
		<category><![CDATA[Quest Connect]]></category>
		<category><![CDATA[Syndicate]]></category>
		<category><![CDATA[training]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Training Materials]]></category>

		<guid isPermaLink="false">http://straightpathsql.mikewalshonline.com/?p=60</guid>
		<description><![CDATA[

Where?
Quest Connect is an online series of webcasts on various topics. Some are pre-recorded (like the session that I did.. more on that later&#8230;). They have web casts on a variety of topics, not just SQL. You can look at the on demand topic listing here to see all the chats that will be available [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.straightpathsql.com%252Farchives%252F2009%252F10%252Ffree-sql-training-online-wednesday-102109%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Free%20SQL%20Training%20Online%20-%20Wednesday%2010%2F21%2F09%20%23%22%20%7D);"></div>
<h2>Where?</h2>
<p>Quest Connect is an online series of webcasts on various topics. Some are pre-recorded (like the session that I did.. more on that later&#8230;). They have web casts on a variety of topics, not just SQL. You can look at the on demand topic listing <a href="http://events.unisfair.com/QC2009/Ondemandwebcastlist_9-9-09.pdf" target="_blank">here </a>to see all the chats that will be available on demand. There will also be several live web casts with Q&amp;A, etc. You can see those <a href="http://events.unisfair.com/index.jsp?eid=433&amp;seid=25" target="_blank">here</a>.</p>
<h2>What?</h2>
<h3><strong>Live SQL Webcast Monday 10/@10:00AM EDT<br /></strong></h3>
<p>There is one Live Webcast with Q&amp;A on SQL Server (&#8220;<strong>A Sysadmins guide to SQL Server</strong>&#8220;) at 10:00AM EDT. The hosts will be such experts as Brent Ozar (<a href="http://www.brentozar.com" target="_blank">Blog</a>/<a href="http://twitter.com/brento">Twitter</a>), Thomas LaRock (<a href="http://thomaslarock.com/" target="_blank">Blog</a>/<a href="http://twitter.com/sqlrockstar" target="_blank">Twitter</a>) and Tim Ford (<a href="http://www.ford-it.com/sqlagentman/" target="_blank">Blog</a>/<a href="http://twitter.com/sqlagentman" target="_blank">Twitter</a>). This will be great for those reluctant DBAs (you know, you&#8217;re a server admin or windows admin, you help out on the SAN, you have to manage SQL.. you do it all but you are scared every second).</p>
<h3><strong>Pre-recorded sessions (including one with me)</strong></h3>
<p><strong>These will be available from 4AM on 10/21 &#8211;&gt; 4AM on 10/22 (times are in EDT)</strong></p>
<p>You can see the full catalog of sessions for all subject areas <a href="http://events.unisfair.com/QC2009/Ondemandwebcastlist_9-9-09.pdf" target="_blank">here</a>. The ones specific to SQL Server are:</p>
<ul>
<li><strong>&#8220;Top 10 SQL Server Administration Mistakes&#8221;</strong> &#8211; I&#8217;ll talk in more depth about this one below.</li>
<li><strong>&#8220;Understanding Execution Plans&#8221;</strong> &#8211; With Grant Frtichey (<a href="http://scarydba.wordpress.com/" target="_blank">Blog</a>/Twitter) They aren&#8217;t that scary. Watch a scary DBA walk you through how easy they can be if you just know what to look for!</li>
<li><strong>&#8220;The top 5 things you can do with Litespeed for SQL Server to be a backup and recovery hero&#8221;</strong> &#8211; A title after my own heart: it&#8217;s long&#8230;&nbsp; Quest puts these things on for us for free so it&#8217;s only natural to have some talks about how their products can help. Litespeed is a great tool (not paid to say it, don&#8217;t use it currently but have in other environments). Learn about this great backup tool and I am sure that Brent will give some good backup/recovery advice at the same time. Brent Ozar and Jason Hall will present this one.</li>
</ul>
<h2>Why did they ask me to help?</h2>
<p>I guess I&#8217;ve blogged about a few worst practices (Shrinking anyone?, Shoot From the hip much anyone?) so I was asked to help participate in the <strong>&#8220;Top 10 SQL Server Administration Mistakes&#8221; </strong>chat. This was a fun recording and is a great conversation with a few folks much smarter than me &#8211; Kevin Kline (<a href="http://sqlblog.com/blogs/kevin_kline/" target="_blank">Blog</a>/<a href="http://twitter.com/kekline" target="_blank">Twitter</a>), Colin Stasiuk (<a href="http://benchmarkitconsulting.com/" target="_blank">Blog</a>/<a href="http://www.twitter.com/benchmarkit" target="_blank">Twitter</a>) and Jason Strate (<a href="http://blogs.digineer.com/blogs/jasons/default.aspx" target="_blank">Blog</a>/<a href="http://twitter.com/stratesql" target="_blank">Twitter</a>) and myself about mistakes we have done, seen and had to help fix in our careers.</p>
<p>We&#8217;ll walk through a PowerPoint of 10 mistakes that DBAs often make when working with SQL Server. They range from issues like considering disk options based on space needs only, shoddy troubleshooting, not embracing change control (maybe embrace is too strong a word <img src='http://www.straightpathsql.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) to bad thinking with backup and recovery.</p>
<p>It was an informative talk, I learned a few things on the talk myself and you&#8217;ll even hear an epiphany moment where three of us picked up a great tip around change control/rollback steps. A real <strong>&#8220;Why didn&#8217;t I think of that&#8230;&#8221; </strong>moment.</p>
<p>I hope you register for Quest Connect and check out all of the videos and I hope you check out the conversation that Kevin, Colin, Jason and myself had around DBA &#8220;stuff&#8221;, might help you out, might start a conversation.</p>
<h2>Resources for the presentation I was a part of:</h2>
<p><strong>First of all: Comments. </strong>If you have any questions on the parts of the conversation I was in, you can hit me up on <a href="http://twitter.com/mike_walsh" target="_blank">twitter </a>but I don&#8217;t get there much on most weekdays. Leave a comment on this post if it is a question that others might benefit from or add insight into. Send me an e-<a href="mailto:mike@straightpathsql.com" target="_blank">mail </a>if you want to talk out of the comment thread instead.</p>
<p>I hope you check out the blogs of all of those who participated, I gave links above. You can also go to <a href="http://www.sqlserverpedia.com/" target="_blank">SQLServerPedia</a> where all of our blogs are syndicated and search blogs and SQL wiki articles on a topic you want to know more on.</p>
<p>If I remember correctly, I mentioned the SQL Server 2000 I/O Best Practices document. It is not 100% applicable to 2005/2008 but the basic concepts largely remain true and this is a good resource.But instead of linking you there, <a href="http://technet.microsoft.com/en-us/library/cc966412.aspx#EAAA" target="_blank">check out this document from Microsoft</a> which is more recent and it references that SQL 2000 document as a resource at the bottom.</p>
<p>I also suggest visiting the <a href="http://sqlcat.com/Default.aspx" target="_blank">SQLCAT </a>team website with their best practices, great resource. If you don&#8217;t own the Inside SQL Server 2005 series, you should. Microsoft SQL Server 2008 Internals is also a great resource. These books go into a lot more depth on a lot of the areas we talked about.</p>
<p>There are also some blog topics on my blog that are related to what we talked about:</p>
<ul>
<li>Advice to beginning DBAs wondering, <a href="http://www.straightpathsql.com/blog/2009/3/5/where-do-i-start.html" target="_blank">&#8220;Where do I start?!?!&#8221;</a></li>
<li><a href="http://www.straightpathsql.com/blog/category/shrinking-transactions" target="_blank">Shrinking</a> &#8211; several posts on the topic.</li>
<li><a href="http://www.straightpathsql.com/blog/2008/12/31/troubleshooting-methodology.html" target="_blank">Troubleshooting Methodology</a> Woes (I also wrote an <a href="http://www.sqlservercentral.com/articles/Troubleshooting/66134/" target="_blank">article </a>for SQL Server Central on this topic)</li>
<li>Empirical Evidence</li>
<li><a href="http://www.straightpathsql.com/blog/2009/6/18/documentation.html" target="_blank">Documentation </a>(or how I learned to stop procrastinating and <span style="text-decoration: line-through;">l</span><span style="text-decoration: line-through;">ove</span> tolerate a <span style="text-decoration: line-through;">chore</span> necessary task)</li>
<li>A little<a href="http://www.straightpathsql.com/blog/2009/6/1/paranoid-control-freak-have-i-got-a-career-for-you.html" target="_blank"> Paranoia and Control Freak</a> attitude can help a DBA</li>
<li><a href="http://www.straightpathsql.com/blog/2009/3/16/checklists-recipes-and-algorithms.html" target="_blank">Checklists, Recipes and Algorithms</a> &#8211; Learning about these great tools from other professions (Pilots, Chefs and Doctors)&nbsp;</li>
<li><a href="http://www.straightpathsql.com/blog/2009/2/25/what-sql-instances-are-installed-on-my-network.html" target="_blank">How do I find all of my SQL Servers?</a> &#8211; Maybe after listening to us you&#8217;ll want to spend more time with the instances at your network. Check this link out to learn about a tool that I use to find all the SQL Servers in my network.</li>
<li><a href="http://www.straightpathsql.com/blog/2009/1/27/new-vendor-interview-with-an-annoying-dba.html" target="_blank">Questions to ask a software vendor</a> &#8211; Working with a new vendor with their own database? Here are some questions I ask them.</li>
</ul>
<p>Thanks for listening, thanks for stopping by to check out the blog. I hope you visit the other guy&#8217;s sites also. Lots of information and like I said, <a href="http://www.sqlserverpedia.com" target="_blank">SQLServerPedia</a> is a great place to find info. There are a lot of great bloggers there. I also have a lot of bloggers I read in my <a href="http://www.straightpathsql.com/blogroll/" target="_blank">blogroll</a>.</p>

<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.straightpathsql.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.straightpathsql.com/archives/2009/10/free-sql-training-online-wednesday-102109/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Picture That Says, &#8220;Don&#8217;t Shrink!&#8221; (and other things&#8230;)</title>
		<link>http://www.straightpathsql.com/archives/2009/06/a-picture-that-says-dont-shrink-and-other-things/</link>
		<comments>http://www.straightpathsql.com/archives/2009/06/a-picture-that-says-dont-shrink-and-other-things/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 00:28:07 +0000</pubDate>
		<dc:creator>Mike Walsh</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Learn From Mistakes]]></category>
		<category><![CDATA[Pet Peeve]]></category>
		<category><![CDATA[Syndicate]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Fragmentation]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Shrinking & Transactions]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://straightpathsql.mikewalshonline.com/?p=44</guid>
		<description><![CDATA[

So I wrote a lot of posts around shrinking (Here, here, here). Some of my posts were turned into a wiki article on SQLServerPedia. I thought I was done posting about this but one more.
I talked about why we shouldn&#8217;t do it on a regular basis. Why it should really be reserved for use in [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.straightpathsql.com%252Farchives%252F2009%252F06%252Fa-picture-that-says-dont-shrink-and-other-things%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22A%20Picture%20That%20Says%2C%20%5C%22Don%27t%20Shrink%21%5C%22%20%28and%20other%20things...%29%20%23%22%20%7D);"></div>
<p>So I wrote a lot of posts around shrinking (<a href="http://www.straightpathsql.com/blog/2009/1/6/dont-touch-that-shrink-button.html">Here</a>, <a href="http://www.straightpathsql.com/blog/2009/1/31/shrinking-is-a-popular-topic.html">here</a>, <a href="http://www.straightpathsql.com/blog/2009/4/15/manage-your-transactions-so-they-dont-manage-you-part-2.html">here</a>). Some of my posts were turned into a wiki <a href="http://sqlserverpedia.com/wiki/Shrinking_Databases">article </a>on <a href="http://www.sqlserverpedia.org/">SQLServerPedia</a>. I thought I was done posting about this but one more.</p>
<p>I talked about why we shouldn&#8217;t do it on a regular basis. Why it should really be reserved for use in dev or extenuating circumstances due to a lack of proper planning. I also talked about why it is bad to let your databases grow in small chunks.</p>
<p>I can&#8217;t stress it enough&#8230; Right sizing your database is critical. This requires <strong>PLANNING</strong>. If you don&#8217;t plan for performance you will be killed by performance in no time. If your company or your project manager says something like, &#8220;We don&#8217;t have time to plan for that&#8221; then you will pay for it later at least 75% of the time and you will pay more than you would have up front.</p>
<p>The below picture is from a system somewhere that I got involved in after it had been &#8220;alive&#8221; (persistent vegetative state&#8230;) for a couple years. It was set to do a DB shrink each night after a transaction log truncate (Again &#8211;&gt; Don&#8217;t do this! If you want to recover to a point in time, use FULL Recovery mode and TAKE LOG BACKUPS at a frequency that manages your recovery needs (first) and your transaction log growth (second). This was done on each database on the instance.</p>
<div id="attachment_203" class="wp-caption aligncenter" style="width: 1071px"><img src="http://www.straightpathsql.com/wp-content/uploads/2009/06/fragmentation.JPG" alt="Lots of Red and Lots of Fragments" title="disk-fragmentation" width="1061" height="140" class="size-full wp-image-203" /><p class="wp-caption-text">Lots of Red and Lots of Fragments</p></div>
<p>This is with the windows defragment tool. A quick reminder: Blue (there are about 5 or 6 skinny blue lines in the above picture) indicates contiguous space, no physical file fragmentation. Red indicates fragments. No, I didn&#8217;t play with the colors. Most other drives remind me of Christmas also.</p>
<p><strong>What does this mean?</strong> This<strong> </strong>means that I/O operations against this drive have an unfair advantage working against them. Reads will not be as well performing as they should. (For instance copying an LDF file off of this &#8211; <strong>data file drive &#8211; </strong>to move the .ldf to a <strong>log file drive</strong> took 4 minutes. No other activity, file was 1GB..)</p>
<p><strong>How did it get this way?</strong> Every night the files on this data file drive were shrunk as part of a shrinkdb operation. Every night after this shrink an ETL process loads it. Files then grow in chunks during the ETL (and some of them grow during the day with use, like the report server temp database). These growths and shrinks lead to file fragmentation.</p>
<p><strong>How long did it take?</strong> Much like my current status on the scale (14.6 stone when I should be 12.5.. I&#8217;ll let you bing, google or ask wolfram alpha if you care) this didn&#8217;t happen overnight. It took a period of neglect. Neglect including:</p>
<ul>
<li>The Shrinks/growths</li>
<li>Never planning for the expected space and proper sizing in the first place</li>
<li>Allocating the bare minimum to the drive (88% full right now) and adding more space from the SAN as &#8220;needed&#8221;.</li>
<li>Never running a defragment process during maintenance.</li>
</ul>
<p><strong>What do we do? </strong>Well for the short term we are going to grow the databases to an appropriate amount (hopefully getting more space allocated before all of this obviously), back them up, turn off the SQL Server services, remove any files that shouldn&#8217;t be on this drive and defragment the volume.</p>
<p><strong>What do we do in the future? </strong>The shrinking operations were killed awhile ago (except for one that was hidden in an ETL process, since removed), I will make sure that a process is put in place to check for fragmentation more frequently. I will keep fighting the fight to properly size a database from the beginning.</p>
<p><strong style="font-size: 120%;">Not My Job</strong></p>
<p><span>Nearly no other phrase can irk me quite like that. You don&#8217;t even have to say it, you can just experience it. Now I am guilty here also. Where this case happened, the databases are managed from SQL out by the DBA, the servers/storage/etc are managed by the storage and server team. Put trust in that team and never really looked at fragmentation. <strong>OOPS</strong>. Now it isn&#8217;t my job and normally I go out of my way to worry about things that could affect databases I care about, for some reason I never checked fragmentation here.</span></p>
<p><span>When talking to the sysadmin about I/O issues, I started talking about a desire to split some of the report server databases onto their own drives (large reports running, seeing a lot of blocking with the built in report server procs that write/read to the databases) and the reaction was very quickly &#8220;No, you have high fragmentation.. let me show you&#8221; and then we opened disk management in window and looked at the fragmentation. My reaction was guilt and shame for not checking. Then my second reaction was (internally) &#8220;How did you know this and not say anything?!&#8221; The conversation basically revealed that this was a known issue for some time. Now before the DBA role was filled there was no one else looking at database performance on the applications team. How did this sysadmin expect project managers and developers without much systems/DBA knowledge play Carnac and figure out the fragmentation?</span></p>
<p><span><strong>The attitude that killed here? </strong>&#8220;I just create the disks and give them to the people who request it, I give them the space they asked for and that&#8217;s it.&#8221; </span></p>
<p><span>You can&#8217;t do that. If you want to be a good DBA you need to look above and below your part of the food chain and if you see an area that needs improvement, SPEAK UP. Same goes for sysadmins and storage teams. You are one company with the same customers and the same goal of happy customers.</span></p>
<p><strong>Reminder &#8211;&gt; </strong>Are you looking at your physical file fragmentation levels? I am sure you are a great DBA and update your stats, rebuild indexes when appropriate. Do you look at your I/O subsystem? Do you check your fragmentation? Do you get blinded by the simple in search for a complex situation? I do at times. Check your fragmentation levels and run some benchmarks. Fix this headache before it becomes a resume altering situation.</p>

<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.straightpathsql.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.straightpathsql.com/archives/2009/06/a-picture-that-says-dont-shrink-and-other-things/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
