<?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>SQLRockstar &#124; Thomas LaRock &#187; MSSQL</title>
	<atom:link href="http://thomaslarock.com/category/mssql/feed/" rel="self" type="application/rss+xml" />
	<link>http://thomaslarock.com</link>
	<description></description>
	<lastBuildDate>Mon, 06 Feb 2012 18:30:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SQL Excursions: Napa</title>
		<link>http://thomaslarock.com/2012/02/sql-excursions-napa/</link>
		<comments>http://thomaslarock.com/2012/02/sql-excursions-napa/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 15:00:00 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[SQL Excursions]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=7586</guid>
		<description><![CDATA[Do you enjoy working with SQL Server? Do you enjoy relaxing in wine country? Would you like to work with SQL server AND relax in wine country at the same time?
I know I would. And so would Denny Cherry. In fact, Denny liked the idea so much he decided to create SQL Excursions, a series [...]<p><p></p>
<a href="http://thomaslarock.com/2012/02/sql-excursions-napa/">SQL Excursions: Napa</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div id="attachment_7587" class="wp-caption alignleft" style="width: 310px"><img class="size-medium wp-image-7587" title="napa-wine-edit-2" src="http://thomaslarock.com/wp-content/uploads/2012/02/napa-wine-edit-2-300x199.jpg?9d7bd4" alt="" width="300" height="199" /><p class="wp-caption-text">You could be here!</p></div>
<p>Do you enjoy working with SQL Server? Do you enjoy relaxing in wine country? Would you like to work with SQL server AND relax in wine country at the same time?</p>
<p>I know I would. And so would Denny Cherry. In fact, Denny liked the idea so much he decided to create <a href="http://sqlexcursions.com/">SQL Excursions</a>, a series of events where people can <a href="http://sqlexcursions.com/about">get together to learn about SQL in a relaxing manner</a>. And I was honored that Denny asked me to be the first guest presenter with him for the <a href="http://sqlexcursions.com/napa-2011-sign-up">very first SQL Excursion coming up in Napa, CA</a> from May 17-19.</p>
<p>Check out the <a href="http://sqlexcursions.com/napa-agenda">agenda for the event</a>. If you want I can summarize it for you here: #SQLWINNING</p>
<p><strong>Performance Tuning Made Easy</strong> - This will be similar to the half-day session offered at PASS that had 250 people in the room and another 100 that were turned away. If you were one of those 100, you will want to attend as I plan on taking a deeper dive into how to help you be more effective in your current role, something I cannot do when speaking to hundreds of people at once.</p>
<p><strong>Storage Configuration and Tuning</strong> - Denny Cherry is one of the top experts in the world when it comes to storage configuration and tuning and a Microsoft Certified Master in SQL Server. Come listen to him teach you some tips and tricks with regards to storage, which will lead nicely into&#8230;</p>
<p><strong>Virtualization and SQL Server</strong> - &#8230;Denny and I sharing our experiences with SQL Server running in a virtualized environment. We expect to not only show you some examples of VMWare and Hyper-V, but we are also planning on having you put your hands on the products as well. We want you to leave Napa feeling comfortable navigating your way through a virtual environment.</p>
<p><strong>SQL Server Indexing Top Down</strong> - Denny will walk you through indexing and SQL Server, discussing strategies for how you can tune queries using proper indexing and how to conduct proper index maintenance.</p>
<p><strong>How Table Partitioning Works to Save You Money </strong>- Denny has been helping clients for years save money with some very simple partitioning techniques. Denny will help you understand how to get this done for your shop as well.</p>
<p><strong>Hands On Troubleshooting</strong> - This will be similar to the series of &#8220;Choose Your Own Adventure&#8221; talks that I have been participating in recently. We will walk you through real scenarios where you will need to troubleshoot using native tools only. This shared learning experience will provide you a solid base for how to troubleshoot the vast majority of performance issues in your own shop.</p>
<p>OK, now comes the important part: <a href="http://sqlexcursions.com/napa-2011-sign-up">go here to register</a>. Don&#8217;t forget we will have wine tastings, wonderful weather, great food, and an opportunity to network and build relationships with your peers that will serve you well going forward.</p>
<p>I can&#8217;t wait to see you there!</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/02/sql-excursions-napa/">SQL Excursions: Napa</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
<div class="shr-publisher-7586"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F02%2Fsql-excursions-napa%2F' data-shr_title='SQL+Excursions%3A+Napa'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F02%2Fsql-excursions-napa%2F' data-shr_title='SQL+Excursions%3A+Napa'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/02/sql-excursions-napa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop Guessing About CPU Pressure</title>
		<link>http://thomaslarock.com/2012/01/stop-guessing-about-cpu-pressure/</link>
		<comments>http://thomaslarock.com/2012/01/stop-guessing-about-cpu-pressure/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 19:21:44 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[evangelism]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[VMWare]]></category>
		<category><![CDATA[vSphere]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=7538</guid>
		<description><![CDATA[Ever try to troubleshoot something that doesn&#8217;t really exist?
I think this virtualization thing is here to stay, I really do, but the trouble I see people having with virtualization is that they don&#8217;t know where the bottleneck truly lies. There are so many layers involved that most standard troubleshooting techniques fall short. Just think for [...]<p><p></p>
<a href="http://thomaslarock.com/2012/01/stop-guessing-about-cpu-pressure/">Stop Guessing About CPU Pressure</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div id="attachment_7543" class="wp-caption alignleft" style="width: 310px"><img class="size-medium wp-image-7543" title="cpu" src="http://thomaslarock.com/wp-content/uploads/2012/01/cpu-300x224.jpg?9d7bd4" alt="" width="300" height="224" /><p class="wp-caption-text">This tiny guy runs everything you do!</p></div>
<p>Ever try to troubleshoot something that doesn&#8217;t really exist?</p>
<p>I think this virtualization thing is here to stay, I really do, but the trouble I see people having with virtualization is that they don&#8217;t know where the bottleneck truly lies. There are so many layers involved that most standard troubleshooting techniques fall short. Just think for a minute about being a SQL Server DBA in a virtual world: you administer a piece of software, running on a guest O/S, that is running on a host, that is connected to a datastore that may or may not be shared with &#8220;noisy neighbors&#8221;.</p>
<p>Knowing all that, when an end-user comes to you and says &#8220;this query is running slow&#8221;, where do you begin to look?</p>
<p>I always start with the virtual layers. I&#8217;d rather spend 5 minutes ruling out the virtual layer as a bottleneck before I try to tune a query. It makes no sense to spend time trying to make a query run faster if the bottleneck is at the host level, for example. That&#8217;s wasted time, and I *hate* wasting time.</p>
<p>One example I see often these days has to do with CPU pressure. In my experience most database servers are not CPU bound. (I said &#8220;most&#8221; and &#8220;my experience&#8221;.) Usually a database server has a lot of extra CPU cycles to spare. But that is not always the case in the virtual world. So when I come across a database instance that is showing CPU pressure I like to ask a very general question: Is it internal pressure, or external?</p>
<p>One of my favorite metrics to examine when researching potential CPU pressure is called <strong>signal waits</strong>. You can read more about signal waits at this <a href="http://blogs.msdn.com/b/sqlcat/archive/2005/09/05/461199.aspx">blog post by a member of the SQLCAT team</a>. The default threshold I like to set is 25%, meaning once I see I have about 25% of my sessions simply waiting for an available CPU I am likely to believe that the CPU pressure is internal to the instance. Of course more factors come into play before I would define 25% to be a problem, such as volume of sessions, length of time for each session to execute, etc.</p>
<p>But what about a guest O/S that is also waiting for an available CPU from the host? Imagine that your sessions are waiting for the SQLOS to give you an available CPU, and the SQLOS itself is waiting for an available CPU from the host? Wouldn&#8217;t it be nice if there was a metric for you to know if the issue is at the guest layer, and not internal to SQL?</p>
<p>Well as luck would have it <a href="http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/cpu_counters.html" target="_blank">such a metric does exist</a>: <strong>CPU ready time</strong>. This is simply a metric that tells you the percentage of time that your guest was ready to run, but could not get scheduled.</p>
<p>Together the signal waits and CPU ready time help to give you a more complete picture of what is happening to your database instance. Unfortunately, you can&#8217;t get at all of this information easily from within vSphere. Here&#8217;s a quick overview of what you would need to do in vSphere to research CPU pressure:</p>
<ol>
<li>Open vSphere, then go to the correct host, then to the guest that you are interested in monitoring.</li>
<li>On the Performance tab add in the counters you want (but no more than two!)</li>
<li>See real-time information (too bad if your issue was last week and you don&#8217;t have details any longer)</li>
<li>Ascertain if the issue is local to guest by going back to the host and looking at Performance tab</li>
<li>Add in the counters for the host Performance tab view (but no more than two!)</li>
<li>See real-time information (too bad if the issue was last week and you don&#8217;t have details any longer)</li>
<li>Throw up your hands when you realize that you still don&#8217;t know if the pressure is internal or external to SQL running on that guest, on that host</li>
<li>Take your hands and slap yourself when you realize you can&#8217;t tie anything back to specific SQL statements</li>
</ol>
<p>Sounds rather time consuming, right? Especially if you still won&#8217;t have any idea about a root cause or what specific actions to take after spending all that time investigating the issue. If you want to see it for yourself I made a video to show you some of the challenges that vSphere has when it comes to displaying all of the metrics necessary for you to make an informed decision.</p>
<p><p class='post-video'><iframe title="YouTube video player" width="" height="600" src="http://www.youtube.com/embed/fXf18WrQteY" frameborder="0" allowfullscreen></iframe><div id="tentblogger-vimeo-youtube-message" style="width: 100%; border: 1px solid #e6e6e6; background: #f8f8f4; text-align:center; padding: 0.25em; ">Can't see the video in your RSS reader or email? <a target="_blank" href="http://thomaslarock.com/2012/01/stop-guessing-about-cpu-pressure/">Click Here!</a></div></p>
<p>The short of it is that vSphere is never going to give you a complete view (including SQL statements or even number of sessions running) in one screen. But <a href="http://www.confio.com/English/Products/Ignite_VM.php" target="_blank">IgniteVM</a> will do that for you, saving you time, and ultimately money as well, money that can then be used to buy more <a href="http://www.nueskes.com/" target="_blank">bacon</a> <a href="http://baconery.com/" target="_blank">related</a> <a href="http://www.thinkgeek.com/brain/whereisit.cgi?t=bacon&amp;x=7&amp;y=15">products</a> for your home or office (don&#8217;t forget <a href="http://baconlube.com/" target="_blank">Valentine&#8217;s Day</a> is right around the corner).</p>
<p>Not only is virtualization here to stay, but tools like IgniteVM will be here as well to help administrators quickly find the root cause for performance bottlenecks.</p>
<p>Want to chat more about monitoring your virtual database servers? Then <a href="http://thomaslarock.com/contact-me/">contact me</a> and I would be happy to set up some time to talk. Also, <a href="http://www.confio.com" target="_blank">Confio</a> has regular product demos: <a href="https://cc.readytalk.com/cc/s/showReg?udc=9kbm2zx15p5u" target="_blank">go register for the next one here</a>.</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/01/stop-guessing-about-cpu-pressure/">Stop Guessing About CPU Pressure</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
<div class="shr-publisher-7538"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Fstop-guessing-about-cpu-pressure%2F' data-shr_title='Stop+Guessing+About+CPU+Pressure'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Fstop-guessing-about-cpu-pressure%2F' data-shr_title='Stop+Guessing+About+CPU+Pressure'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/01/stop-guessing-about-cpu-pressure/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SQL 2012 Database Engine Tuning Advisor: Now With More Plan Cache!</title>
		<link>http://thomaslarock.com/2012/01/sql-2012-database-engine-tuning-advisor-now-with-more-plan-cache/</link>
		<comments>http://thomaslarock.com/2012/01/sql-2012-database-engine-tuning-advisor-now-with-more-plan-cache/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 19:55:44 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[advisor]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=7475</guid>
		<description><![CDATA[I&#8217;m normally not one to advocate the use of the Database Engine Tuning Advisor (DETA), a tool available inside of Microsoft SQL Server. (To be fair, I&#8217;m not a fan of the SQL Tuning Advisor from Oracle, either.) But I recently came across a little nugget of information that I wanted to share with you regarding [...]<p><p></p>
<a href="http://thomaslarock.com/2012/01/sql-2012-database-engine-tuning-advisor-now-with-more-plan-cache/">SQL 2012 Database Engine Tuning Advisor: Now With More Plan Cache!</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I&#8217;m normally not one to advocate the use of the Database Engine Tuning Advisor (DETA), a tool available inside of Microsoft SQL Server. (To be fair, I&#8217;m not a fan of the <a href="http://docs.oracle.com/cd/B28359_01/server.111/b28274/sql_tune.htm">SQL Tuning Advisor</a> from Oracle, either.) But I recently came across a little nugget of information that I wanted to share with you regarding an improvement in the <a href="http://msdn.microsoft.com/en-us/library/ms186354(v=sql.110).aspx">DETA for SQL2012</a>. You may not know it from clicking on that link, so I&#8217;ll spell it out for you here:</p>
<p>&#8220;<em>To tune a database by using the plan cache</em>&#8221;</p>
<p>And suddenly I am interested in using the DETA again. This makes things so much easier for me as an end-user. I no longer need to configure the DETA to run at a specific time. I can simply point-and-click and instantly have a handful of recommendations to evaluate.</p>
<p>Of course taking action on the recommendations without doing any analysis is not a recommended course of action. But the idea that I can use the plan cache is something I am eager to try.</p>
<p>Here&#8217;s hoping I won&#8217;t be disappointed&#8230;again.</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/01/sql-2012-database-engine-tuning-advisor-now-with-more-plan-cache/">SQL 2012 Database Engine Tuning Advisor: Now With More Plan Cache!</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
<div class="shr-publisher-7475"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Fsql-2012-database-engine-tuning-advisor-now-with-more-plan-cache%2F' data-shr_title='SQL+2012+Database+Engine+Tuning+Advisor%3A+Now+With+More+Plan+Cache%21'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Fsql-2012-database-engine-tuning-advisor-now-with-more-plan-cache%2F' data-shr_title='SQL+2012+Database+Engine+Tuning+Advisor%3A+Now+With+More+Plan+Cache%21'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/01/sql-2012-database-engine-tuning-advisor-now-with-more-plan-cache/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Is Your DBA Lying To You?</title>
		<link>http://thomaslarock.com/2012/01/is-your-dba-lying-to-you/</link>
		<comments>http://thomaslarock.com/2012/01/is-your-dba-lying-to-you/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 17:02:37 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Database administrator]]></category>
		<category><![CDATA[Database management system]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[More Reasons Why Barack and I Were Seperated At Birth]]></category>
		<category><![CDATA[Reasons Why I Will Not Be Invited to the MVP Summit]]></category>
		<category><![CDATA[white lies]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=7431</guid>
		<description><![CDATA[&#8220;Signs point to yes.&#8221; &#8211; Magic 8-Ball prophecy
You have probably heard this line at one point, the one that says &#8220;the best DBAs are the ones you never see or hear?&#8221; I used to think that was a result of some sketchy personal hygiene choices and later on understood it to mean that if everything [...]<p><p></p>
<a href="http://thomaslarock.com/2012/01/is-your-dba-lying-to-you/">Is Your DBA Lying To You?</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div id="attachment_7454" class="wp-caption alignleft" style="width: 310px"><img class="size-medium wp-image-7454 " title="Would I lie to you?" src="http://thomaslarock.com/wp-content/uploads/2012/01/lying-300x187.jpg?9d7bd4" alt="Would I lie to you?" width="300" height="187" /><p class="wp-caption-text">Trust me, I&#39;m a DBA</p></div>
<p>&#8220;<em>Signs point to yes</em>.&#8221; &#8211; Magic 8-Ball prophecy</p>
<p>You have probably heard this line at one point, the one that says &#8220;the best DBAs are the ones you never see or hear?&#8221; I used to think that was a result of some sketchy personal hygiene choices and later on understood it to mean that if everything is running smoothly then there isn&#8217;t a need to see your DBA. It&#8217;s kinda like how you never see your plumber. Oh sure, you could call him (or her) and chat, have them over for drinks or dinner one night, but you never bother talking to them until your toilet backs up and there&#8217;s crap everywhere. That&#8217;s how most DBAs are treated as well, we don&#8217;t get called until <em>after</em> the crap is on the floor.</p>
<p>Unlike your plumber most DBAs are performing regular work on your databases. Much of this work will go unnoticed. The reason for that is simple: you&#8217;ll freak out if you knew what we were doing. And if you ask us about something we are likely to tell you half-truths because (1) we don&#8217;t want you to freak out and (2) you never understand us when we talk to you anyway.</p>
<p>Here&#8217;s my list of things that I am willing to bet your DBA hasn&#8217;t always been truthful about.</p>
<h3>1. Your database server is still on physical hardware</h3>
<p>Probably the number one misconception that end users have these days centers around the use of virtualization. People fear change, and when they are told that their servers are about to be virtualized they freak out. And for the handful of users that don&#8217;t freak out immediately their reaction is just delayed until the moment that something goes wrong and then they blame the fact that the server is on virtual hardware. What&#8217;s that? The bank didn&#8217;t send the files last night, so the import never started? It must be due to the fact that we were virtualized, because before then <em>nothing like this ever happened</em>.</p>
<p>Wrong. Bad things happened before you were virtual, too. It&#8217;s just that you don&#8217;t remember. So we don&#8217;t bother telling you about the switch. No, we wait until it leaks out months later, just so we can say things like &#8220;look, it&#8217;s been on a VM for six months and you never once complained about performance, so don&#8217;t try blaming virtualization for your issues now.&#8221;</p>
<h3>2. Everything is fine, nothing to see here</h3>
<p>Chances are everything is not fine. In fact, chances are the data center is on fire and your server melted last night (good thing they were virtualized so we could failover immediately to a different data center without you knowing) but we aren&#8217;t going to say a word to you about it. And why not?</p>
<div class="wp-caption alignleft" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Backup_Backup_Backup_-_And_Test_Restores.jpg" rel="prettyPhoto[7431]"><img class="zemanta-img-inserted zemanta-img-configured" title="Is it getting warm in here?" src="http://upload.wikimedia.org/wikipedia/commons/thumb/e/ee/Backup_Backup_Backup_-_And_Test_Restores.jpg/300px-Backup_Backup_Backup_-_And_Test_Restores.jpg" alt="Is it getting warm in here?" width="300" height="289" /></a><p class="wp-caption-text">Is it getting warm in here?</p></div>
<p>Because the minute most users hear about something having gone wrong they like to blame EVERYTHING on whatever went wrong. Take this example:</p>
<p>Me: &#8220;Hi Craig, just want you to know that last night at 11PM the differential backup failed. We&#8217;re not sure why yet, but we re-ran them at 11:30PM and those worked. So, if you ever need something from Monday night and ask for the 11PM backup and you&#8217;re told that we only have one for 11:30, you don&#8217;t need to panic.&#8221;</p>
<p>Craig: &#8220;The backups failed?&#8221;</p>
<p>Me: &#8220;Yes, but we re-ran them right away, so we have a good one, just from 11:30PM, and not 11PM&#8221;</p>
<p>Craig: &#8220;OK then, that explains why those reports at midnight didn&#8217;t work.&#8221;</p>
<p>Me: &#8220;No, it doesn&#8217;t, the backups have no bearing on those reports. It&#8217;s two different servers. Your report server melted in the fire. That&#8217;s why they didn&#8217;t run. This is a different server, and a different time. There is no relation between the two.&#8221;</p>
<p>Craig: &#8220;But the reports use data from that server. Chances are the data they retrieved caused the fire.&#8221;</p>
<p>Me: &#8220;Is it too early to start drinking? I guess not, because clearly you have already.&#8221;</p>
<p>That&#8217;s why we don&#8217;t tell you anything. It&#8217;s because no matter what happens you will latch onto it and start blaming it for anything else no matter how unrelated or crazy. You&#8217;ll send emails to managers stating &#8220;facts&#8221; that are just not true, creating more chaos and confusion than if we had said nothing at all.</p>
<p>So we don&#8217;t say anything. No matter how big or small of an event.</p>
<h3>3. It&#8217;s the network</h3>
<p>Your DBA is likely the best looking and smartest person in your IT department. But that doesn&#8217;t mean that they are omnipotent. From time to time they are not going to have an immediate answer for you no matter how long you stand in their cube tapping your feet and reminding them how much money is being lost for each passing minute that they haven&#8217;t solved whatever imaginary problem you are having.</p>
<div id="attachment_7462" class="wp-caption alignleft" style="width: 310px"><img class="size-medium wp-image-7462 " title="What's the worst that can happen?" src="http://thomaslarock.com/wp-content/uploads/2012/01/theuglynetwork-300x225.jpg?9d7bd4" alt="" width="300" height="225" /><p class="wp-caption-text">You should have seen it BEFORE we consolidated.</p></div>
<p>It&#8217;s during times like these that the most seasoned of DBAs will reach into for the modern-day equivalent of a &#8220;<a href="http://en.wikipedia.org/wiki/Get_Out_of_Jail_Free_card">get out of jail free</a>&#8221; card by turning their heads, looking deep into your eyes and saying those magical words:</p>
<p>&#8220;<em>Looks like it could be a problem with the network</em>.&#8221;</p>
<p>This one line is pure gold. It buys any DBA the time they need to investigate the real problem as most folks will walk out of the cube once they believe the DBA is on the trail and closer to finding a solution. And once those people leave you alone to focus on the issue you are likely to be able to find a solution.</p>
<p>And don&#8217;t worry about blaming the network. The network admins don&#8217;t mind, because they just blame management for not buying the right hardware the first time around. And then management tells the end users they will need to live with the bad performance until the network issues are worked out. It&#8217;s the circle of life in IT, and it works.</p>
<h3>4. Of course your server is dedicated</h3>
<p>Not likely, no it is not. Not only does your database server also run all sorts of other things like anti-virus software and software for taking server tape backups, but chances are it is running other services like SSAS or SSIS. And let&#8217;s not forget all those vendors that insist their application be installed on the same server as the database &#8220;for performance reasons&#8221; which I always found amusing every time we found the performance bottleneck to be the application itself. Good times.</p>
<p>And let&#8217;s not forget the price of all that hardware and software. As much as I enjoy having my overall CPU utilization to be less than ten percent if the guys who write the checks find out that we are wasting ninety percent of our capacity then there is a good chance we won&#8217;t ever be able to buy anything new and then you&#8217;ll have to hear your DBA say things like &#8220;this is why we can&#8217;t have nice things&#8221; each time you ask if your server is dedicated. So, just don&#8217;t bother. Your server is a resource and is likely being used by others. Get used to the idea.</p>
<h3>5. Yes I gave you the permissions you asked for</h3>
<p>Not only do vendors like to insist that their applications are installed on the same server as the database, but they also insist on having full administrative rights. Why are such rights necessary? Quite often, they aren&#8217;t, but vendors ask for it because they can. Any good DBA will ask for a list of actions that are needed so that they can grant the permissions necessary for those actions. I once had a vendor tell me they needed full system administrative rights for the database instance AND the O/S because they &#8220;had to create tables and stuff&#8221;.</p>
<p>DBAs, especially the good ones, know this isn&#8217;t true. And so we give you the permissions that you need. Quite often that is different from the permissions that you asked for. And honestly we&#8217;re too tired to explain to you the difference because you usually don&#8217;t care to understand it anyway.</p>
<p>There you go, five things your DBA has probably been less than truthful with you about. That doesn&#8217;t make us bad people. In fact, it makes us more like an adult&#8230;say a parent&#8230;someone who knows the difference between &#8220;want&#8221; and &#8220;need&#8221; and has to make the hard choices that others don&#8217;t want to make.</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/01/is-your-dba-lying-to-you/">Is Your DBA Lying To You?</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
<div class="shr-publisher-7431"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Fis-your-dba-lying-to-you%2F' data-shr_title='Is+Your+DBA+Lying+To+You%3F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Fis-your-dba-lying-to-you%2F' data-shr_title='Is+Your+DBA+Lying+To+You%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/01/is-your-dba-lying-to-you/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Presenting at Tech-Ed(s) This Year</title>
		<link>http://thomaslarock.com/2012/01/presenting-at-techeds-this-year/</link>
		<comments>http://thomaslarock.com/2012/01/presenting-at-techeds-this-year/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 17:03:39 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[Amsterdam]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[Orlando]]></category>
		<category><![CDATA[precon]]></category>
		<category><![CDATA[teched]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=7409</guid>
		<description><![CDATA[The announcements came out yesterday and I can now tell the world that I will be presenting at TechEd this year. Denny Cherry (blog &#124; @mrdenny) and I will be doing a precon seminar at TechEd in Orlando in June. The title is &#8220;Microsoft SQL Server Performance Tuning and Optimization&#8221; and we are very excited to have [...]<p><p></p>
<a href="http://thomaslarock.com/2012/01/presenting-at-techeds-this-year/">Presenting at Tech-Ed(s) This Year</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div id="attachment_7412" class="wp-caption alignleft" style="width: 272px"><img class="size-full wp-image-7412" title="Wall O'Cheese" src="http://thomaslarock.com/wp-content/uploads/2012/01/cheese.jpeg?9d7bd4" alt="Wall O'Cheese" width="262" height="193" /><p class="wp-caption-text">I&#39;m hoping they have enough wine to go with all that cheese.</p></div>
<p>The announcements came out yesterday and I can now tell the world that I will be presenting at TechEd this year. Denny Cherry (<a href="http://itknowledgeexchange.techtarget.com/sql-server/">blog</a> | @<a href="http://twitter.com/mrdenny">mrdenny</a>) and I will be doing a <a href="http://northamerica.msteched.com/preconferenceseminars" target="_blank">precon seminar</a> at TechEd in Orlando in June. The title is &#8220;Microsoft SQL Server Performance Tuning and Optimization&#8221; and we are very excited to have this opportunity.</p>
<p>And apparently Microsoft is excited to have us as well, because they are also sending the two of us to Amsterdam to do a <a href="http://europe.msteched.com/PreCons" target="_blank">repeat performance two weeks later</a> for TechEd Europe.</p>
<p>Go and get yourself registered for <a href="http://northamerica.msteched.com/registration" target="_blank">Orlando</a>, <a href="http://europe.msteched.com/Registration" target="_blank">Amsterdam</a>, or both!</p>
<p>I&#8217;m making a list of all the things I want to see and do in Amsterdam while there, and I&#8217;m putting Van Halen at the top of the list followed by eating a raw herring while wearing wooden shoes and sitting under a windmill.</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/01/presenting-at-techeds-this-year/">Presenting at Tech-Ed(s) This Year</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
<div class="shr-publisher-7409"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Fpresenting-at-techeds-this-year%2F' data-shr_title='Presenting+at+Tech-Ed%28s%29+This+Year'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Fpresenting-at-techeds-this-year%2F' data-shr_title='Presenting+at+Tech-Ed%28s%29+This+Year'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/01/presenting-at-techeds-this-year/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How To Improve Database Performance Without Changing Code</title>
		<link>http://thomaslarock.com/2012/01/how-to-improve-database-performance-without-changing-code/</link>
		<comments>http://thomaslarock.com/2012/01/how-to-improve-database-performance-without-changing-code/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 19:33:47 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tempdb]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=7356</guid>
		<description><![CDATA[I hear it all the time. It&#8217;s a familiar refrain. Most of the time it is innocent enough, and understandable. But there are times when hearing those words are like hearing the screech of fingernails on a chalkboard:
&#8220;We can&#8217;t change the code.&#8221;
There you are, listening to someone complain to you about the database server, and [...]<p><p></p>
<a href="http://thomaslarock.com/2012/01/how-to-improve-database-performance-without-changing-code/">How To Improve Database Performance Without Changing Code</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img class="alignleft size-full wp-image-7396" title="database" src="http://thomaslarock.com/wp-content/uploads/2012/01/database.png?9d7bd4" alt="" width="128" height="128" />I hear it all the time. It&#8217;s a familiar refrain. Most of the time it is innocent enough, and understandable. But there are times when hearing those words are like hearing the screech of fingernails on a chalkboard:</p>
<p>&#8220;We can&#8217;t change the code.&#8221;</p>
<p>There you are, listening to someone complain to you about the database server, and wanting you to fix the problem. You examine the situation and can see an easy code change that would improve performance immediately only to be told &#8220;no code changes allowed&#8221;. Your heart sinks. You get frustrated that they won&#8217;t make any code changes. The user gets frustrated that you don&#8217;t have any other options to offer. You ask about changing a stored procedure, or rewriting a view definition, or helping to redesign a few tables from the &#8216;database&#8217; that is nothing more than an Excel spreadsheet. &#8220;No&#8221;, &#8220;no&#8221;, and &#8220;no&#8221; you are told, along with &#8220;stop blaming the code, you <em><strong>always</strong></em> blame the code!&#8221;</p>
<p>You are at an impasse. You wish you had a handy list of things to try.</p>
<p>And now you do.</p>
<p>Here are six ways you can improve database performance without changing code, listed in no particular order. They have different levels of difficulty but they all have something in common: no code changes necessary. And your end user will be happy that you can provide them some options.</p>
<h3>1. Utilize a proper indexing strategy</h3>
<p>I know I said &#8220;no code changes&#8221;, but indexes are more of a schema change than a code change. And unless you have code that utilizes index hints, you shouldn&#8217;t have to worry too much about needing to change code to <em>avoid</em> using an index.</p>
<p>There are more than a handful of blogs out there that talk about missing or unused indexes. I will point you to the <a href="http://msdn.microsoft.com/en-us/library/ms345417.aspx" target="_blank">MSDN article on how to find missing indexes</a>, as that is likely to be the most useful for you. I will also give you this caveat: adding indexes is not always the right thing to do! You need to be aware of all the activity hitting the underlying table. If you decide to create an index to improve a specific query run monthly to generate a report, you could be doing a disservice to the hourly DUIs (Deletes, Updates, Inserts) that are happening. Be aware of the overall usage before you just start adding indexes for performance.</p>
<p>As for eliminating unused indexes, I would caution you there to make certain you know that the index is truly not being used. If you have been looking at index usage for the past week and find a few hundred that haven&#8217;t been touched, don&#8217;t go around dropping them because they could very well be used on a monthly basis. Again, know the system and workloads a bit before making these changes. One thing you are likely to be able to do right away is to <a href="http://thomaslarock.com/2010/08/how-to-find-duplicate-indexes/" target="_blank">remove duplicate indexes</a>.</p>
<p>A proper indexing strategy would involve the periodic investigation into finding indexes that are missing, that are duplicates, and are unused.</p>
<h3>2. Add memory</h3>
<p>Everything SQL Server does *has* to go through memory. Every query you run *has* to read/write pages from/to memory. So why not make certain you have enough memory on your server in order to store as many pages as possible? No, I can&#8217;t think of any reason either.</p>
<p>Here&#8217;s a <a href="http://msdn.microsoft.com/en-us/library/ms187499.aspx" target="_blank">link to MSDN that will get you started on memory architecture</a> and proper memory configurations for SQL Server. I&#8217;ve seen cases where people have purchased extra memory but failed to configure SQL Server to take advantage of it properly. Don&#8217;t be one of them, spend a few minutes to read up on things and make certain you have an idea about what you are doing.</p>
<p>If your server memory settings are already configured properly for SQL then consider purchasing more. Usually swapping in new memory is an easy enough process, and in <a href="http://msdn.microsoft.com/en-us/library/ms175490.aspx">some cases can be done on the fly without the need to restart the server</a>.</p>
<h3>3. Check your Windows Power Plan Settings</h3>
<p>Were you aware that your CPUs may be only operating at <em>half</em> of their designed speeds? Well, <a href="http://sqlserverperformance.wordpress.com/2010/09/28/windows-power-plans-and-cpu-performance/">you are now</a>. Of course this means you need to decide what is more important: the perception of being &#8216;green&#8217; or not having your users standing in your cube complaining about bad performance. Sure, the idea regarding Windows Power Plans is a good one. I won&#8217;t argue that. But for database servers it can be a real detriment to performance. If your company has a policy of enabling the power plans by default, you should have them revisit that policy for the database servers. The amount of power savings you get is often not offset by the performance loss.</p>
<p>You can find a <a href="http://www.cpuid.com/softwares/cpu-z/versions-history.html" target="_blank">copy of CPU-Z for download here</a>.</p>
<h3>4. Optimize your tempdb for performance</h3>
<p>This one is often overlooked as most folks wait around for a problem with tempdb performance before thinking about how best to optimize it for performance right from the start. This <a href="http://sqlcat.com/sqlcat/b/top10lists/archive/2007/11/21/storage-top-10-best-practices.aspx" target="_blank">SQLCAT link</a> mentions this as well, and there is <a href="http://msdn.microsoft.com/en-us/library/ms175527.aspx" target="_blank">info over at MSDN that you should review</a> before making changes. And yes, you <em>should</em> consider moving tempdb to it&#8217;s own dedicated set of drives.</p>
<p>In fact, I would tell you that the placing of data files, log files, backup files, and tempdb onto separate disks <strong>should</strong> be a part of any standard database server build. I emphasize the &#8216;should&#8217; because for some odd reason I still see shops where this is not true. If that is the case for you, and you need to boost performance, then roll up your sleeves and get started on the work that should have been done from the onset. Speaking of which&#8230;</p>
<h3>5. Using distinct disks for data files, log files, and database backups</h3>
<p>Stop putting everything you have onto one drive. It&#8217;s typically a bad thing to do for performance, and an even worse thing to do in terms of disaster recovery. And don&#8217;t think that putting six disks into a RAID5 array and then assigning three logical partitions is going to solve your performance (or possible disaster) issues, either. Drives fail, that&#8217;s what they all do eventually. And when they do you won&#8217;t want to have all your eggs in that basket.</p>
<p>Here&#8217;s a <a href="http://sqlcat.com/sqlcat/b/top10lists/archive/2007/11/21/storage-top-10-best-practices.aspx" target="_blank">list of goodness from SQLCAT</a> regarding best practices for SQL Server storage. Chances are you will find a handful of things on that list that will help with your performance.</p>
<h3>6. Get faster disks, like <em>really</em> fast disks</h3>
<p>As long as we are talking about disk configurations I might as well mention that <a href="http://www.fusionio.com/platforms/iodrive-duo/" target="_blank">you could upgrade to use solid-state disks</a> (SSDs). They&#8217;re <a href="http://novicksoftware.com/Articles/sql-server-ssd-solid-state-disk.htm" target="_blank">fast</a>, and getting cheaper with each passing day. So if you are planning on monkeying around with your disks anyway, now would be a good time to see if purchasing some SSDs would make sense for your shop.</p>
<p>Just don&#8217;t forget to put your data files, log files, and database backups on separate drives. We&#8217;ve talked about this already, remember? Disasters happen, that&#8217;s why they are called disasters. Don&#8217;t by one big mack-daddy SSD and toss everything on there because you have performance to spare. And if you decide to do that anyway, get a head start on updating your resume now as well.</p>
<p>And there you go, six options for improving database performance without changing code. Look, I never said they were going to be easy, or cheap, or fast&#8230;just that you had some options.</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/01/how-to-improve-database-performance-without-changing-code/">How To Improve Database Performance Without Changing Code</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
<div class="shr-publisher-7356"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Fhow-to-improve-database-performance-without-changing-code%2F' data-shr_title='How+To+Improve+Database+Performance+Without+Changing+Code'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Fhow-to-improve-database-performance-without-changing-code%2F' data-shr_title='How+To+Improve+Database+Performance+Without+Changing+Code'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/01/how-to-improve-database-performance-without-changing-code/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Review of DBA Survivor by Mike Fal</title>
		<link>http://thomaslarock.com/2012/01/review-of-dba-survivor-by-mike-fal/</link>
		<comments>http://thomaslarock.com/2012/01/review-of-dba-survivor-by-mike-fal/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 16:19:17 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Book Reviews]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[DBA Survivor]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=7344</guid>
		<description><![CDATA[Saw this review today and wanted to share it with everyone here:
http://www.mikefal.net/2012/01/03/dba-survivor-learning-how-to-rock-out-with-databases/
I&#8217;m touched that Mike would take the time to write such a wonderful (and unsolicited) review of &#8220;that little book&#8221; I wrote almost two years ago now. I&#8217;d like for you to read his entire review, but I am going to share his last [...]<p><p></p>
<a href="http://thomaslarock.com/2012/01/review-of-dba-survivor-by-mike-fal/">Review of DBA Survivor by Mike Fal</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Saw this review today and wanted to share it with everyone here:</p>
<p><a href="http://www.mikefal.net/2012/01/03/dba-survivor-learning-how-to-rock-out-with-databases/">http://www.mikefal.net/2012/01/03/dba-survivor-learning-how-to-rock-out-with-databases/</a></p>
<p>I&#8217;m touched that Mike would take the time to write such a wonderful (and unsolicited) review of &#8220;that little book&#8221; I wrote almost two years ago now. I&#8217;d like for you to read his entire review, but I am going to share his last paragraph with you here:</p>
<p><em>&#8220;Now many folks probably think this is just a book for the junior DBA, for someone who’s just getting started, but I know this book has value for data professionals of all levels. This book is not a detailed guide or roadmap for solving specific problems, but a series of highway sign posts to get people headed in the right direction. Maybe you are a fresh DBA, looking to get in to the industry or just survive your first week on the job. Or maybe you’re like me, a career DBA who is looking to refocus my career and looking for that “big picture view”. No matter how you got here, DBA Survivor is an excellent starting point for the rest of your database career.&#8221;</em></p>
<p>The holiday shopping season may be over, but <a href="http://www.amazon.com/gp/offer-listing/1430227877?ie=UTF8&amp;tag=sq0f-20&amp;linkCode=am2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1430227877">my book</a> would still make an <a href="http://thomaslarock.com/2011/12/the-perfect-gift-for-any-new-dba/">excellent gift</a> at any time of the year (yes, that *is* my opinion, thankyouverymuch).</p>
<p>Thanks Mike, next time I see you the bacon is on me!</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/01/review-of-dba-survivor-by-mike-fal/">Review of DBA Survivor by Mike Fal</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
<div class="shr-publisher-7344"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Freview-of-dba-survivor-by-mike-fal%2F' data-shr_title='Review+of+DBA+Survivor+by+Mike+Fal'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Freview-of-dba-survivor-by-mike-fal%2F' data-shr_title='Review+of+DBA+Survivor+by+Mike+Fal'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/01/review-of-dba-survivor-by-mike-fal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do You Make These 5 Database Design Mistakes?</title>
		<link>http://thomaslarock.com/2012/01/do-you-make-these-5-database-design-mistakes/</link>
		<comments>http://thomaslarock.com/2012/01/do-you-make-these-5-database-design-mistakes/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 19:20:24 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[data quality]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[mistakes]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=7297</guid>
		<description><![CDATA[Look, everyone makes mistakes. It&#8217;s true. But not all of us have the chance to make mistakes that end up costing millions of dollars in hardware and production support costs.
Any one of the following five mistakes listed below will add additional costs to your company. It&#8217;s guaranteed. The costs could be hardware related (extra disk space, [...]<p><p></p>
<a href="http://thomaslarock.com/2012/01/do-you-make-these-5-database-design-mistakes/">Do You Make These 5 Database Design Mistakes?</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img class="alignleft size-thumbnail wp-image-7316" title="undo-button" src="http://thomaslarock.com/wp-content/uploads/2012/01/undo-button-150x150.jpg?9d7bd4" alt="" width="150" height="150" />Look, everyone makes mistakes. It&#8217;s true. But not all of us have the chance to make mistakes that end up costing millions of dollars in hardware and production support costs.</p>
<p>Any one of the following five mistakes listed below will add additional costs to your company. It&#8217;s guaranteed. The costs could be hardware related (extra disk space, network bandwidth), which tend to add up quickly. The costs are also support related (bad performance, database re-design, report creation, etc.), and they add up <em>very</em> quickly.</p>
<p>Want to save your company some money, some headaches for your end-users, and ensure data quality all at the same time? Then avoid these five database design mistakes.</p>
<h3>1. Going BIG, just in case</h3>
<p>I often see data types being chosen as if they don&#8217;t matter. But the truth is <em>they do matter</em>. If you know that the only possible values for a certain column are between 0 and 100,000 then you don&#8217;t need to slap a BIGINT data type for that column when a INT would do just fine. Why does this matter? The BIGINT data type requires 8 bytes of storage, and the INT requires only 4 bytes of storage. That means for each row of data you could be wasting 4 bytes. Doesn&#8217;t sound like much, right?</p>
<p>OK then, let&#8217;s consider that your table has two million rows. Multiply those rows by 4 bytes and you have 8 million bytes, or roughly 7.8MB of wasted space. I know it doesn&#8217;t sound like a lot, does it? Well, it adds up, and quickly. I&#8217;ve only shown you an example for just one column, but what about those NCHAR(2000) columns that are storing mostly first and last names? How much extra overhead for those? How about your date columns? Do you have a need for calendar dates prior to the year 1900, or after the year  2079? Then SMALLDATETIME is likely to work just fine for you.Oh, and let&#8217;s not forget that these columns can be indexed, and those indexes will also be unnecessarily wider as well.</p>
<p>Choosing the right data type matters, for all sorts of reasons. Take the time and make an effort to get it right at the start.</p>
<h3>2. Expecting a DBMS feature to mean the same across all systems</h3>
<p>Bigger companies tend to have a variety of systems, all of which need to exchange data. It is quite common to see familiar terms in use by those systems. For example, you are likely to see the use of the term TIMESTAMP. You simply cannot assume that the format of TIMESTAMP will be the same between systems. If you do you are likely to have issues at some point. If you are lucky the issues will manifest themselves early. If you are unlucky the issue will lay dormant until the worst possible time for your system to come to a grinding halt.</p>
<div id="attachment_7317" class="wp-caption alignleft" style="width: 310px"><img class="size-medium wp-image-7317" title="bridge_design_mistake" src="http://thomaslarock.com/wp-content/uploads/2012/01/bridge_design_mistake-300x226.jpg?9d7bd4" alt="What's the worst that can happen?" width="300" height="226" /><p class="wp-caption-text">What&#39;s the worst that can happen?</p></div>
<p>I chose TIMESTAMP as my example here because it is one of my favorite misnomers inside of SQL Server. Why? <a href="http://msdn.microsoft.com/en-us/library/ms182776(v=sql.90).aspx">Because TIMESTAMP has nothing to do with date or time</a>. And I love this hidden gem inside the BOL:</p>
<p><em>The Transact-SQL timestamp data type is different from the timestamp data type defined in the ISO standard.</em></p>
<p>So that means other systems that <em>do</em> adhere to the ISO standard of what it means to be a TIMESTAMP are going to return something vastly different. Take Oracle, for example, and <a href="http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements001.htm">how they define a TIMESTAMP value</a>. Even <a href="http://www.devx.com/dbzone/Article/28713">DB2 has some subtle differences</a> as well. The lesson here is that when you are working with disparate systems, do not assume that familiar terminologies will work in exactly the same way.</p>
<h3>3. Expecting database-generated identifiers to be sequential</h3>
<p>Being able to insert data into a database in sequential order has many benefits, and most database designers will look to implement some type of mechanism to ensure that such sequences are used. However, many of those mechanisms will leave &#8220;gaps&#8221; from time to time, and these gaps lead to confusion as people except to see {1, 2, 3, 4, 5&#8230;} and not something like {1, 2, 4, 5, 6&#8230;}. As soon as a gap is found people send out a search party, looking for the missing data. I know I&#8217;ve lost hours trying to track down &#8220;bugs&#8221; in systems where people thought rows of data were missing, only to realize that the integrity of the data was fine but the method for generating the sequence was not.</p>
<p>Now, for reasons I can&#8217;t explain, people just <strong><em>love</em></strong> GUIDs in database designs. One of the (many) issues with GUIDs is that they are not sequential by default. This will lead to decreased performance, often in a very short amount of time. For a great explanation of this in detail, <a href="http://sqlskills.com/BLOGS/KIMBERLY/post/GUIDs-as-PRIMARY-KEYs-andor-the-clustering-key.aspx">check out this post by Kimberly Tripp at SQL Skills</a>. The part you want to pay attention to is here:</p>
<p><em>&#8220;But, a GUID that is not sequential&#8230;can be a <strong>horribly bad choice</strong> - primarily because of the fragmentation that it creates in the base table but also because of its size. It&#8217;s unnecessarily wide&#8230;&#8221;</em></p>
<p>Yeah, that *is* what she said.</p>
<h3>4. Not examining your foreign keys (FKs) as part of your indexing strategy</h3>
<p>I am assuming, of course, that you even <em>have</em> foreign keys defined. I&#8217;ve seen *many* databases that have little to no primary keys, foreign keys, or even any indexes defined. No, I don&#8217;t know who would do such a thing either. But they&#8217;re out there, and sooner or later you will find them, too.</p>
<p>Assuming you have FKs defined then you should be evaluating to see if it would make sense to add indexes to match those FK definitions. In some case, it will. In other cases, it won&#8217;t. But you should make certain that this type of review is part of your overall design process.</p>
<h3>5. Applying surrogate key without having the original business key as an alternate</h3>
<p>Back to those folks who love the GUIDs for a moment. If you are using a surrogate key (and, ideally, one that is sequential) in your database design you should not forget that the data in your table should also have an alternate key based upon the business logic that was used to necessitate the creation of the table in the first place.</p>
<p>Many database designers tend to focus on the surrogate key only, and forget all about the other columns. And this is bad for your data quality, as it would allow for duplicate values to creep into your business layer if you do not put a unique constraint/index on that alternate key. Nobody wants that, trust me.</p>
<p>And there you have it. Avoid these five database design mistakes and save your company money, headaches, and ensure data quality all at the same time.</p>
<p><p></p>
<a href="http://thomaslarock.com/2012/01/do-you-make-these-5-database-design-mistakes/">Do You Make These 5 Database Design Mistakes?</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
<div class="shr-publisher-7297"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Fdo-you-make-these-5-database-design-mistakes%2F' data-shr_title='Do+You+Make+These+5+Database+Design+Mistakes%3F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2012%2F01%2Fdo-you-make-these-5-database-design-mistakes%2F' data-shr_title='Do+You+Make+These+5+Database+Design+Mistakes%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2012/01/do-you-make-these-5-database-design-mistakes/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>SQL 2012 Special Ops Tour &#8211; Part 2</title>
		<link>http://thomaslarock.com/2011/12/sql-2012-special-ops-tour-part-2/</link>
		<comments>http://thomaslarock.com/2011/12/sql-2012-special-ops-tour-part-2/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 16:10:06 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[SQL Server 2012]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=7263</guid>
		<description><![CDATA[I&#8217;m starting to think these folks had a little too much fun putting these clips together.

SQL 2012 Special Ops Tour &#8211; Part 2 is a post from: SQLRockstar &#124; Thomas LaRock

Join Denny Cherry (@mrdenny) and me for two days of SQL instruction, training, and wine tasting in the California sunshine this May for $799.


<p><p></p>
<a href="http://thomaslarock.com/2011/12/sql-2012-special-ops-tour-part-2/">SQL 2012 Special Ops Tour &#8211; Part 2</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I&#8217;m starting to think these folks had a little too much fun putting these clips together.</p>
<p><p></p>
<a href="http://thomaslarock.com/2011/12/sql-2012-special-ops-tour-part-2/">SQL 2012 Special Ops Tour &#8211; Part 2</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
<div class="shr-publisher-7263"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2011%2F12%2Fsql-2012-special-ops-tour-part-2%2F' data-shr_title='SQL+2012+Special+Ops+Tour+-+Part+2'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2011%2F12%2Fsql-2012-special-ops-tour-part-2%2F' data-shr_title='SQL+2012+Special+Ops+Tour+-+Part+2'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2011/12/sql-2012-special-ops-tour-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7 Mistakes You Can&#8217;t Afford To Make When Upgrading to SQL 2012</title>
		<link>http://thomaslarock.com/2011/12/7-mistakes-you-cant-afford-to-make-when-upgrading-to-sql-2012/</link>
		<comments>http://thomaslarock.com/2011/12/7-mistakes-you-cant-afford-to-make-when-upgrading-to-sql-2012/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 16:40:44 +0000</pubDate>
		<dc:creator>sqlrockstar</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[SQL MVP]]></category>
		<category><![CDATA[SQLServerPedia Wiki]]></category>
		<category><![CDATA[Denali]]></category>
		<category><![CDATA[migrating]]></category>
		<category><![CDATA[mistakes]]></category>
		<category><![CDATA[sp_refreshview]]></category>
		<category><![CDATA[SQL 2012]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[upgrading]]></category>

		<guid isPermaLink="false">http://thomaslarock.com/?p=7161</guid>
		<description><![CDATA[
It&#8217;s new, it&#8217;s shiny, and it smells like frozen yogurt.
No, it&#8217;s not the blender you got for Christmas. It&#8217;s SQL 2012 (formerly known as codename &#8216;Denali&#8217;). And it&#8217;s here. And you want to use it, you know you do.
As much as you would like to believe that migrating to SQL 2012 is as easy as [...]<p><p></p>
<a href="http://thomaslarock.com/2011/12/7-mistakes-you-cant-afford-to-make-when-upgrading-to-sql-2012/">7 Mistakes You Can&#8217;t Afford To Make When Upgrading to SQL 2012</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img class="alignleft size-medium wp-image-7239" title="SQL-Server-2012" src="http://thomaslarock.com/wp-content/uploads/2011/12/SQL-Server-2012-300x246.png?9d7bd4" alt="" width="300" height="246" /></p>
<p>It&#8217;s new, it&#8217;s shiny, and it smells like frozen yogurt.</p>
<p>No, it&#8217;s not the <a title="Rohypnol not included." href="http://www.blenderworld.com/vita-1500.html">blender you got for Christmas</a>. It&#8217;s SQL 2012 (formerly known as codename &#8216;Denali&#8217;). <a href="http://www.microsoft.com/sqlserver/en/us/future-editions.aspx">And it&#8217;s here</a>. And you want to use it, you know you do.</p>
<p>As much as you would like to believe that migrating to SQL 2012 is as easy as doing a backup and a restore, the reality is that you need to take some extra steps before letting your end users run amok in SQL 2012 goodness. The last thing you want is for one of them to get in there and report back things like:</p>
<p>&#8220;It&#8217;s slower than SQL 2008&#8243;, or</p>
<p>&#8220;When will your team be able to support SQL 2012?&#8221;</p>
<p>Nobody wants that to happen to you. Here are the seven mistakes you can&#8217;t afford to make.</p>
<h3>1. Failing to use the SQL 2012 Upgrade Advisor</h3>
<p>The <a href="http://msdn.microsoft.com/en-us/library/ms144256(v=sql.110).aspx">SQL 2012 Upgrade Advisor</a> (UA) is just that: an advisor. It doesn&#8217;t fix everything, it merely advises you on what actions you should take when upgrading to SQL 2012. The actions the UA recommends will come in two forms: those actions to be done prior to a migration, and those actions to be completed post-migration. The UA is really good at finding what I call the &#8220;stub-your-big-toe&#8221; things that need fixing prior to a migration. But it is not foolproof, it will not identify every last detail. You will need to play the role of an actual DBA when migrating to a new version.</p>
<h3>2. Not reviewing the &#8220;breaking changes&#8221; section in the Books Online</h3>
<p>Did you know that Microsoft <a href="http://technet.microsoft.com/en-us/library/ms143179(SQL.110).aspx">publishes a list of breaking changes</a> for each version of SQL Server? Well, you do now. You should review them to the point that they are familiar to you. You don&#8217;t have to memorize them all, just be familiar with them so that if something odd happens you can think to yourself &#8220;&#8230;hey, is this odd behavior listed in the breaking changes section of the BOL&#8221;? I would like to believe that the UA will alert you to many of these breaking changes but the truth is the UA is not as dynamic as the BOL. That means the BOL may have an entry or two that doesn&#8217;t make it into the UA checklist, and that is why you should review this section.</p>
<h3>3. Skipping the &#8220;behavioral changes&#8221; section in the Books Online</h3>
<p>Similar to the breaking changes, the <a href="http://msdn.microsoft.com/en-us/library/cc707785(v=sql.110).aspx">behavioral changes</a> are changes that could still affect you in an adverse way. They are definitely worth reviewing, and they are also things that the UA is likely to never report back to you about because they aren&#8217;t things that *will* break, but merely things that *could* break.</p>
<h3>4. Forgetting to execute DBCC CHECKDB WITH DATA_PURITY</h3>
<p>One of your post-migration or upgrade tasks should be to <a href="http://msdn.microsoft.com/en-us/library/ms176064(v=SQL.110).aspx">run the following</a> statement:</p>
<pre>DBCC CHECKDB WITH DATA_PURITY;</pre>
<p>This statement will check your data for values that are no longer valid for the column datatype. For databases created prior to SQL 2005 (and you *know* they are still out there), this step is rather important to take. For databases created in SQL 2005 and later, the DATA_PURITY check is <em>supposed</em> to be done automatically with a regular CHECKDB.</p>
<p>But what about a database that was <em>created</em> in SQL 2000, migrated (poorly) to a SQL 2008 instance, and left in the SQL 2000 (80) backward compatibility mode? What about that little feller? Do you want to assume that the DATA_PURITY check has been getting done? Here&#8217;s a thought: just go run it yourself anyway. That way you know it is getting done.</p>
<h3>5. Ignoring the execute DBCC UPDATEUSAGE command</h3>
<p>While not as critical as the DATA_PURITY command noted previously, this one still has a place in any migration or upgrade process:</p>
<pre>DBCC UPDATEUSAGE(db_name);</pre>
<p>This <a href="http://msdn.microsoft.com/en-us/library/ms188414(v=SQL.110).aspx">command</a> will help fix any page count inaccuracies that are resulting in the sp_spaceused stored procedure returning wrong results. And much like the DATA_PURITY check, this command is also recommended for databases that were created prior to SQL 2005. For databases created in SQL 2005 and later, you should only run this command if you feel you are getting inaccurate results from sp_spaceused, and you should note that for very large tables this command could take a long time to execute.</p>
<h3>6. Not updating statistics</h3>
<p>This one is not to be skipped and is simply a MUST for any migration or upgrade checklist:</p>
<pre>USE db_name;
GO
EXEC sp_updatestats;</pre>
<p>This command will update the statistics for all the tables in your database. It issues the <a href="http://msdn.microsoft.com/en-us/library/ms187348(v=sql.110).aspx">UPDATE STATISTICS command</a>, which warrants mentioning because you *may* want to use that command with the FULLSCAN option. I&#8217;m the type of person that would rather be safe than sorry and therefore would end up running something like this:</p>
<pre>USE db_name;
GO
EXEC sp_MSforeachtable @command1='UPDATE STATISTICS ? WITH FULLSCAN';</pre>
<p>Bottom line here: don&#8217;t forget to update the statistics.</p>
<h3>7. Failing to refresh your views using sp_refreshview</h3>
<p>Believe it or not, every now and then someone will build a view that spans into another database on the same instance. And, in what may be a complete surprise to many, sometimes these views will go across a linked server as well. The point here is that your view may not be contained in just your database. In what could be the most dramatic twist of all, sometimes these views are created using a SELECT * syntax.</p>
<p>I know, I know…what are the odds that you could have such code in your shop? But it happens. And when you have bad code on top of views that go to other databases (or views of views of views of whatever else some sadistic person built) you are going to want to <a href="http://msdn.microsoft.com/en-us/library/ms187821(v=SQL.110).aspx">use sp_refreshview</a> to refresh those views.</p>
<p>So, if you are migrating a database in your environment to a new server then it would be a good idea to refresh your views using sp_refreshview. Most of the time it won’t do anything for you, much like any movie with Stephen Baldwin. But there is that one chance where it will dramatically improve performance and your customer will be happy as a result. It’s like flossing: it doesn’t take much effort, and the end result is usually worth that little effort.</p>
<p>And with the Holiday Season upon us, I leave you with a Christmas Bonus: an eighth mistake you can&#8217;t afford to make:</p>
<h3>BONUS: Forgetting to take backups</h3>
<p>You&#8217;re a DBA. Backups are in your DNA. You should have taken one prior to the start of any migration, and you had better take one right before you turn that database over to your end users. Also, you should save any output from the seven items listed above, as it could prove helpful should something go awry later.</p>
<p>There you have it, the mistakes you can&#8217;t afford to make when upgrading to SQL 2012. If you haven&#8217;t started building up your SQL 2012 migration or upgrade checklist yet, now is the time, and get these seven items included. They will save you pain, I promise.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><p></p>
<a href="http://thomaslarock.com/2011/12/7-mistakes-you-cant-afford-to-make-when-upgrading-to-sql-2012/">7 Mistakes You Can&#8217;t Afford To Make When Upgrading to SQL 2012</a> is a post from: <a href="http://thomaslarock.com">SQLRockstar | Thomas LaRock</a>
<p></p>
Join Denny Cherry (<a href="http://www.twitter.com/mrdenny">@mrdenny</a>) and me for two days of SQL instruction, training, and wine tasting in the California sunshine <a href="http://sqlexcursions.com/napa-2011-sign-up">this May for $799</a>.
<p></p>
</p>
<div class="shr-publisher-7161"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2011%2F12%2F7-mistakes-you-cant-afford-to-make-when-upgrading-to-sql-2012%2F' data-shr_title='7+Mistakes+You+Can%27t+Afford+To+Make+When+Upgrading+to+SQL+2012'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fthomaslarock.com%2F2011%2F12%2F7-mistakes-you-cant-afford-to-make-when-upgrading-to-sql-2012%2F' data-shr_title='7+Mistakes+You+Can%27t+Afford+To+Make+When+Upgrading+to+SQL+2012'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://thomaslarock.com/2011/12/7-mistakes-you-cant-afford-to-make-when-upgrading-to-sql-2012/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: basic
Database Caching 16/55 queries in 0.041 seconds using disk: basic
Object Caching 2010/2117 objects using disk: basic

Served from: thomaslarock.com @ 2012-02-07 12:33:43 -->
