<?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> &#187; General</title>
	<atom:link href="http://benchmarkitconsulting.com/category/sql-server/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://benchmarkitconsulting.com</link>
	<description></description>
	<lastBuildDate>Tue, 17 Jan 2012 15:11:36 +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>#SQLFamily Thoughts</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2011/12/01/sqlfamily-thoughts/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2011/12/01/sqlfamily-thoughts/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 14:57:22 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[#SQLFamily]]></category>
		<category><![CDATA[Benchmark IT Consulting.com]]></category>
		<category><![CDATA[MemeMonday]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=2010</guid>
		<description><![CDATA[@SQLRockstar (Tom LaRock) recently asked the SQL bloggers in his &#8220;Meme Monday&#8221; series to write about what the term &#8220;SQL Family&#8221; means to them. It&#8217;s amazing how many thoughts/ideas come into your head when you hear the term #SQLFamily. I was able to breakdown what #SQLFamily means to me into 3 categories: Technology Professional Development [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com/#!/SQLRockstar" target="_blank">@SQLRockstar</a> (<a href="http://thomaslarock.com/" target="_blank">Tom LaRock</a>) recently asked the SQL bloggers in his &#8220;<a href="http://thomaslarock.com/2011/11/meme-monday-for-november/" target="_blank">Meme Monday</a>&#8221; series to write about what the term &#8220;SQL Family&#8221; means to them. It&#8217;s amazing how many thoughts/ideas come into your head when you hear the term #SQLFamily.</p>
<p>I was able to breakdown what #SQLFamily means to me into 3 categories:</p>
<ul>
<li>Technology</li>
<li>Professional Development</li>
<li>Personal Relationships</li>
</ul>
<p><strong>Technology</strong></p>
<p>I cannot think of another technical community out there that offers so many great opportunities to learn about a product like SQL Server.  I&#8217;m not just talking about the &#8220;paid&#8221; events like the <a href="http://www.sqlpass.org/summit/2012/default.aspx" target="_blank">PASS Summit</a>, <a href="http://www.devconnections.com/shows/sp2012/default.aspx?s=185" target="_blank">SQLConnections</a>, or <a href="http://www.sqlpass.org/sqlrally/2012/dallas/" target="_blank">SQLRally</a>.</p>
<p>I&#8217;m also talking about all the free training out there the local PASS Chapter meetings, SQLSaturdays, 24 hours of PASS, websites, blogs, etc&#8230;. people are PASSionate about SQL Server and love sharing their knowledge which is AMAZING.</p>
<p>There are also social networking tools like Twitter (#SQLHelp, #SQLPASS, #SQLFamily), Facebook, LinkedIn, and my new found friend Yammer to use to find even more knowledge.</p>
<p>There are so many ways to get amazing information from some of the best in the business.</p>
<p><strong>Professional Development</strong></p>
<p>Being part of the #SQLFamily means that you are able to surround yourself with people who are like you and people that you aspire to be like.  I can honestly say that if I didn&#8217;t jump into the SQL Server Community with both feet I wouldn&#8217;t of met the people responsible for helping me:</p>
<ul>
<li>Start Blogging here at BenchmarkITConsulting.com</li>
<li>Start EDMPASS (The Edmonton PASS Chapter)</li>
<li>Co-Author my first book (Pro SQL Server 2008 Policy Based Management)</li>
<li>Become the Western Canada Regional Mentor for PASS</li>
</ul>
<p>All of which has helped me professionally to grow my knowledge,  name, and business as an Independent Consultant.</p>
<p><strong>Personal Relationships</strong></p>
<p>This is what I believe REALLY sets the #SQLFamily apart from other technology communities.</p>
<p><em>(This is the hardest section of this blog post to describe because to me it is such a phenomenon so bare with me) </em></p>
<p>The people care, they really do care.  It really is like a family&#8230; you might not see everyone as much as you&#8217;d like but when you do it&#8217;s like you haven&#8217;t skipped a beat.  The friendships and camaraderie that I&#8217;ve developed through the #SQLFamily are not just &#8220;work friends&#8221; but real honest to goodness friends.</p>
<p>If someone&#8217;s child is sick, they care.  If someone needs to find a new job, they help.  If someone needs an extra $25 in his <a href="http://ca.movember.com/mospace/1477212" target="_blank">Movember campaign</a> to take first place, they donate (thanks <a href="http://twitter.com/#!/StrateSQL" target="_blank">Jason Strate</a> BTW)</p>
<p><strong>I&#8217;m a better person professionally and personally because of my #SQLFamily.</strong></p>
<p>If you&#8217;d like to chat with me about this or anything else (SQL or other) please leave a comment or hit me up on my Twitter: <a href="http://twitter.com/ColinStasiuk" target="_blank">@ColinStasiuk</a></p>
<p><a href="http://benchmarkitconsulting.com/" target="_blank"><img title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=%23SQLFamily+Thoughts+http://tinyurl.com/c9tnnzu" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/12/01/sqlfamily-thoughts/&amp;title=%23SQLFamily+Thoughts" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/12/01/sqlfamily-thoughts/&amp;title=%23SQLFamily+Thoughts" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/12/01/sqlfamily-thoughts/&amp;title=%23SQLFamily+Thoughts" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2011/12/01/sqlfamily-thoughts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Halloween From Benchmark IT Consulting</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2011/10/31/happy-halloween-from-benchmark-it-consulting/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2011/10/31/happy-halloween-from-benchmark-it-consulting/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 12:00:00 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Happy Halloween]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=1957</guid>
		<description><![CDATA[If you&#8217;d like to chat with me about this or anything else (SQL or other) please leave a comment or hit me up on my Twitter: @ColinStasiuk]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-1958" title="pumpkin" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/10/pumpkin.jpg" alt="" width="300" height="286" /></p>
<p>If you&#8217;d like to chat with me about this or anything else (SQL or other) please leave a comment or hit me up on my Twitter: <a href="http://twitter.com/ColinStasiuk" target="_blank">@ColinStasiuk</a></p>
<p><a href="http://benchmarkitconsulting.com/" target="_blank"><img title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Happy+Halloween+From+Benchmark+IT+Consulting+http://tinyurl.com/4yaxv2f" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/10/31/happy-halloween-from-benchmark-it-consulting/&amp;title=Happy+Halloween+From+Benchmark+IT+Consulting" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/10/31/happy-halloween-from-benchmark-it-consulting/&amp;title=Happy+Halloween+From+Benchmark+IT+Consulting" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/10/31/happy-halloween-from-benchmark-it-consulting/&amp;title=Happy+Halloween+From+Benchmark+IT+Consulting" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2011/10/31/happy-halloween-from-benchmark-it-consulting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn the Page</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2011/10/25/turn-the-page/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2011/10/25/turn-the-page/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 12:00:53 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Denali]]></category>
		<category><![CDATA[Paging]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL2012]]></category>
		<category><![CDATA[sqlpass]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=1918</guid>
		<description><![CDATA[Something that has been problematic at best for developers to deal with historically is the idea of &#8220;paging&#8221;. Basically being able to say that if I was assuming 10 rows per page, I want to see what the contents of page 250 would be. In order for you to work with my example (which uses [...]]]></description>
			<content:encoded><![CDATA[<p><iframe width="420" height="315" src="http://www.youtube.com/embed/3khH9ih2XJg" frameborder="0" allowfullscreen></iframe></p>
<p>Something that has been problematic at best for developers to deal with historically is the idea of &#8220;paging&#8221;.  Basically being able to say that if I was assuming<strong> 10 rows</strong> per page, I want to see what the contents of <strong>page 250</strong> would be.</p>
<p>In order for you to work with my example (which uses a tweaked version of the &#8220;<a href="http://www.opensourcecf.com/1/2009/05/10000-Random-Names-Database.cfm" target="_blank">10,000 Random Names Database</a>&#8221; you&#8217;ll need to download the following file (and be working with CTP3 of SQL2012) <img src='http://benchmarkitconsulting.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  :</p>
<p><a href="http://benchmarkitconsulting.com/wp-content/uploads/2011/10/10000RandomNames.csv" target="_blank">10000 Random Names File</a></p>
<p>Right Click and save it in a location that you will reference in the following SQL Script:</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">IF</span>  <span style="color: #808080;">EXISTS</span> <span style="color: #808080;">&#40;</span><span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span> <span style="color: #0000FF;">FROM</span> sys.<span style="color: #202020;">objects</span> <span style="color: #0000FF;">WHERE</span> <span style="color: #FF00FF;">OBJECT_ID</span> <span style="color: #808080;">=</span> <span style="color: #FF00FF;">OBJECT_ID</span><span style="color: #808080;">&#40;</span>N<span style="color: #FF0000;">'[dbo].[tblNames]'</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">AND</span> type in <span style="color: #808080;">&#40;</span>N<span style="color: #FF0000;">'U'</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">DROP</span> <span style="color: #0000FF;">TABLE</span> <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>tblNames<span style="color: #808080;">&#93;</span>
GO
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">TABLE</span> tblNames
<span style="color: #808080;">&#40;</span>
	NameID		<span style="color: #0000FF;">INT</span> <span style="color: #0000FF;">PRIMARY</span> <span style="color: #0000FF;">KEY</span>,
	FirstName	<span style="color: #0000FF;">NVARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">100</span><span style="color: #808080;">&#41;</span>,
	LastName	<span style="color: #0000FF;">NVARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">100</span><span style="color: #808080;">&#41;</span>
<span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">BULK</span> <span style="color: #0000FF;">INSERT</span> tblNames
<span style="color: #0000FF;">FROM</span>	<span style="color: #FF0000;">'C:<span style="color: #000099; font-weight: bold;">\B</span>LOG<span style="color: #000099; font-weight: bold;">\1</span>0000RandomNames.csv'</span>
<span style="color: #0000FF;">WITH</span>
<span style="color: #808080;">&#40;</span>
	FIELDTERM<span style="color: #808080;">IN</span>AT<span style="color: #808080;">OR</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">','</span>,
	ROWTERM<span style="color: #808080;">IN</span>AT<span style="color: #808080;">OR</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span>
<span style="color: #808080;">&#41;</span>
GO
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">INDEX</span> idx_tblNames_LastName <span style="color: #0000FF;">ON</span> tblNames<span style="color: #808080;">&#40;</span>LastName<span style="color: #808080;">&#41;</span>
<span style="color: #008080;">----------------------------------------------------------</span>
<span style="color: #008080;">----------------------------------------------------------</span>
<span style="color: #0000FF;">DECLARE</span>	@RowsPerPage <span style="color: #0000FF;">INT</span> <span style="color: #808080;">=</span> <span style="color: #000;">10</span>
<span style="color: #0000FF;">DECLARE</span>	@PageRequest <span style="color: #0000FF;">INT</span> <span style="color: #808080;">=</span> <span style="color: #000;">250</span>
&nbsp;
<span style="color: #0000FF;">SELECT</span>	NameID, FirstName, LastName
<span style="color: #0000FF;">FROM</span>	dbo.<span style="color: #202020;">tblNames</span>
<span style="color: #0000FF;">ORDER</span> <span style="color: #0000FF;">BY</span> LastName
OFFSET <span style="color: #808080;">&#40;</span>@RowsPerPage <span style="color: #808080;">*</span> <span style="color: #808080;">&#40;</span>@PageRequest <span style="color: #808080;">-</span> <span style="color: #000;">1</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">ROWS</span>
<span style="color: #0000FF;">FETCH</span> <span style="color: #0000FF;">NEXT</span> @RowsPerPage <span style="color: #0000FF;">ROWS</span> <span style="color: #0000FF;">ONLY</span></pre></div></div>

<p>So let breakdown what we&#8217;ve done here:</p>
<ul>
<li>Created our working table</li>
<li>Populated with the contents of the <a href="http://benchmarkitconsulting.com/wp-content/uploads/2011/10/10000RandomNames.csv" target="_blank">10000 Random Names File </a></li>
<li>Created an index on LastName (not required by the DBA in me thought it was necessary <img src='http://benchmarkitconsulting.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</li>
<li>Declared 2 variables
<ul>
<li><strong>@RowsPerPage </strong>- This is the number of rows contained on a page</li>
<li><strong>@PageRequest</strong> &#8211; This is the page that I&#8217;m looking to retrieve</li>
</ul>
</li>
<li>Ran a SELECT statement utilizing the new &#8220;OFFSET&#8221; and &#8220;FETCH&#8221; parameters to return me <strong>@RowsPerPage</strong> (10 rows) of data starting at offset <strong>@PageRequest</strong> (page 250)</li>
</ul>
<p><img class="alignnone size-full wp-image-1925" title="coolguybench" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/10/coolguybench.jpg" alt="" width="130" height="145" /></p>
<p>How cool is that?</p>
<p>Books Online Reference: <a href="http://msdn.microsoft.com/en-us/library/ms188385%28v=SQL.110%29.aspx#Offset" target="_blank">ORDER BY Clause: Paging</a></p>
<p>If you&#8217;d like to chat with me about this or anything else (SQL or other) please leave a comment or hit me up on my Twitter: <a href="http://twitter.com/ColinStasiuk" target="_blank">@ColinStasiuk</a></p>
<p><a href="http://benchmarkitconsulting.com/" target="_blank"><img title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Turn+the+Page+http://tinyurl.com/3h7k9g7" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/10/25/turn-the-page/&amp;title=Turn+the+Page" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/10/25/turn-the-page/&amp;title=Turn+the+Page" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/10/25/turn-the-page/&amp;title=Turn+the+Page" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2011/10/25/turn-the-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Being a DBA &#8211; I Love What I Do</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2011/07/19/being-a-dba-i-love-what-i-do/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2011/07/19/being-a-dba-i-love-what-i-do/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 12:50:37 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Exceptional DBA Award]]></category>
		<category><![CDATA[Red Gate]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Vote]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=1779</guid>
		<description><![CDATA[I&#8217;m proud to announce that I am a finalist for this years Exceptional DBA Award from Red Gate.  It is an honor to be selected as a candidate to receive this award because being an exceptional DBA is something that I take very seriously.  If you don&#8217;t &#8220;know&#8221; me or haven&#8217;t chatted with me in the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-1780" title="ColinVote" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/07/ColinVote.jpg" alt="" width="299" height="338" /></p>
<p>I&#8217;m proud to announce that I am a finalist for this years <a href="http://www.exceptionaldba.com/vote/" target="_blank">Exceptional DBA Award from Red Gate</a>.  It is an honor to be selected as a candidate to receive this award because being an exceptional DBA is something that I take very seriously.  If you don&#8217;t &#8220;know&#8221; me or haven&#8217;t chatted with me in the past I&#8217;ve included my bio and thoughts as to why I think I am an Exceptional DBA (and no it doesn&#8217;t include #Bacon or #Jager). </p>
<p>You can also find my bio (along with the bios of all the other nominees) on the <a href="http://www.exceptionaldba.com/vote/" target="_blank">Voting Page</a>.</p>
<p><em>Colin Stasiuk has worked with SQL Server for the past 15 years and has been (what he considers to be) a DBA for 12 of those years. He graduated from college in 1997 and was asked to start working for that same college immediately. It is here that Colin got his first &#8220;real-world&#8221; exposure to SQL Server (version 6.5 at the time). Throughout the years Colin has worked exclusively with SQL Server learning and developing his skills as a DBA while always being praised for not only his dedication to the technology but his ability to communicate effectively with his subordinates, peers, and upper management.</em></p>
<p><em>In March of 2008 Colin decided to become an independent consultant and accepted his first contract with the Government of Alberta in Edmonton Canada. Through the process of &#8220;going indy&#8221; Colin stopped being a voyeur of the SQL Community and with the guidance of some key individuals jumped into the community with both feet. Colin started EDMPASS (The Edmonton Chapter of PASS) and his blog to help reach out and start to give back to the SQL community. He has presented at EDMPASS numerous times and was asked to speak at Microsoft Tech-Days in Edmonton. In April of 2010 Colin co-authored his first Apress book: &#8220;Pro SQL Server 2008 Policy Based Management&#8221;.</em></p>
<p><strong><em>Why do you think you should win the Exceptional DBA Award?</em></strong></p>
<p><em>&#8220;I love what I do; being a DBA has not only provided a great life for myself and my family, but has given me the ability and skillset to help protect the most important asset of a company: its data. Since the age of 17 I&#8217;ve been lucky enough to find my niche, and have grown over the past 15 years to become a trusted resource of many companies in North America. One of my greatest professional achievements is that I stay in touch with many of my former employers and each one of them has told me the same thing; that they would hire me back in a second. I am very passionate about empowering other DBAs and developers with the knowledge I have to help them be effective in their roles. Training and experience can make you a DBA, the willingness and ability to share your knowledge effectively makes you an Exceptional DBA.&#8221;</em></p>
<p> If you&#8217;d like to chat with me about this or anything else (SQL or other) please leave a comment or hit me up on my Twitter: <a href="http://twitter.com/ColinStasiuk" target="_blank">@ColinStasiuk</a></p>
<p><a href="http://benchmarkitconsulting.com/" target="_blank"><img title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Being+a+DBA+%26%238211%3B+I+Love+What+I+Do+http://tinyurl.com/3mejgkr" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/07/19/being-a-dba-i-love-what-i-do/&amp;title=Being+a+DBA+%26%238211%3B+I+Love+What+I+Do" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/07/19/being-a-dba-i-love-what-i-do/&amp;title=Being+a+DBA+%26%238211%3B+I+Love+What+I+Do" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/07/19/being-a-dba-i-love-what-i-do/&amp;title=Being+a+DBA+%26%238211%3B+I+Love+What+I+Do" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2011/07/19/being-a-dba-i-love-what-i-do/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Temp Tables and Primary Keys</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2011/07/05/temp-tables-and-primary-keys/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2011/07/05/temp-tables-and-primary-keys/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 15:42:12 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Canada]]></category>
		<category><![CDATA[Constraints]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Edmonton]]></category>
		<category><![CDATA[Primary Keys]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Temp Tables]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=1754</guid>
		<description><![CDATA[Just a quick little post today on a little &#8220;gotcha&#8221; that may getcha. Let&#8217;s say you&#8217;re creating a stored procedure that needs to create a #temp table that has a PRIMARY KEY.  You will want to be careful about how you create this #temp table and here is why: Open SQL Server Management Studio and run the [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick little post today on a little &#8220;gotcha&#8221; that may getcha.</p>
<p>Let&#8217;s say you&#8217;re creating a stored procedure that needs to create a #temp table that has a PRIMARY KEY.  You will want to be careful about how you create this #temp table and here is why:</p>
<p>Open SQL Server Management Studio and run the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span>	<span style="color: #FF00FF;">GETDATE</span><span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> <span style="color: #FF0000;">'TheDate'</span>
<span style="color: #0000FF;">INTO</span>	#TMP1
<span style="color: #0000FF;">ALTER</span> <span style="color: #0000FF;">TABLE</span> #TMP1 <span style="color: #0000FF;">ADD</span> <span style="color: #0000FF;">CONSTRAINT</span> PK_TMP1 <span style="color: #0000FF;">PRIMARY</span> <span style="color: #0000FF;">KEY</span> <span style="color: #0000FF;">CLUSTERED</span> <span style="color: #808080;">&#40;</span>TheDate<span style="color: #808080;">&#41;</span>
GO</pre></div></div>

<p>Now if you open a new Management Studio query window and run the exact same code (simulating what a stored procedure would do) what do you get?</p>
<p><img class="alignnone size-full wp-image-1756" title="Blog1" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/07/Blog1.jpg" alt="" width="457" height="147" /></p>
<p>Because you created your PRIMARY KEY constraint after the fact (and had to give it a name) you lose the uniqueness of the PRIMARY KEY name.</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span>	<span style="color: #808080;">*</span>
<span style="color: #0000FF;">FROM</span>	tempdb.<span style="color: #202020;">INFORMATION_SCHEMA</span>.<span style="color: #202020;">TABLE_CONSTRAINTS</span>
<span style="color: #0000FF;">WHERE</span>	TABLE_NAME like <span style="color: #FF0000;">'%#TMP1%'</span></pre></div></div>

<p><img class="alignnone size-full wp-image-1764" title="Blog2" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/07/Blog21.jpg" alt="" width="975" height="84" /></p>
<p>So how do you get around this?</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">TABLE</span> #TMP1<span style="color: #808080;">&#40;</span>TheDate <span style="color: #0000FF;">DATETIME</span> <span style="color: #0000FF;">PRIMARY</span> <span style="color: #0000FF;">KEY</span><span style="color: #808080;">&#41;</span>
GO
<span style="color: #0000FF;">SELECT</span>	<span style="color: #808080;">*</span>
<span style="color: #0000FF;">FROM</span>	tempdb.<span style="color: #202020;">INFORMATION_SCHEMA</span>.<span style="color: #202020;">TABLE_CONSTRAINTS</span>
<span style="color: #0000FF;">WHERE</span>	TABLE_NAME like <span style="color: #FF0000;">'%#TMP1%'</span></pre></div></div>

<p><img class="alignnone size-full wp-image-1766" title="Blog3" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/07/Blog31.jpg" alt="" width="836" height="101" /></p>
<p>and if you run this in 3 different query windows&#8230;.</p>
<p><img class="alignnone size-full wp-image-1767" title="Blog4" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/07/Blog41.jpg" alt="" width="876" height="145" /></p>
<p> Now I used Primary Keys as my example but this same &#8220;gotcha&#8221; applies to constraints in general.  If you were to add a check constraint that validated &#8220;TheDate&#8221; and gave that check constraint a name you would run into the same &#8220;cannot create constraint&#8230; duplicate object&#8221; error. </p>
<p>Moral of the story: When dealing with temporary tables in reuseable code (like stored procedures) don&#8217;t name your constraints.</p>
<p>And now you know&#8230;.</p>
<p><img class="alignnone size-full wp-image-1769" title="20070402_gijoeBig" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/07/20070402_gijoeBig.jpg" alt="" width="400" height="233" /></p>
<p>Enjoy!! (Follow me on Twitter: <a href="http://twitter.com/ColinStasiuk" target="_blank">@ColinStasiuk</a>)</p>
<p><a href="http://benchmarkitconsulting.com/" target="_blank"><img title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Temp+Tables+and+Primary+Keys+http://tinyurl.com/6a6ed2u" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/07/05/temp-tables-and-primary-keys/&amp;title=Temp+Tables+and+Primary+Keys" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/07/05/temp-tables-and-primary-keys/&amp;title=Temp+Tables+and+Primary+Keys" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/07/05/temp-tables-and-primary-keys/&amp;title=Temp+Tables+and+Primary+Keys" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2011/07/05/temp-tables-and-primary-keys/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My New Job</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2011/06/13/my-new-job/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2011/06/13/my-new-job/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 14:44:19 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Edmonton]]></category>
		<category><![CDATA[Invidi]]></category>
		<category><![CDATA[Professional]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=1746</guid>
		<description><![CDATA[So if you read my last blog post: Wind of Change you were both subjected to some 80s &#8220;rock&#8221; care of Scorpions and my announcement that I was leaving my then current gig for a new contract. I&#8217;m now happy to formally announce that I&#8217;m the new Senior DBA for Invidi. This is an exciting opportunity [...]]]></description>
			<content:encoded><![CDATA[<p>So if you read my last blog post: <a href="http://benchmarkitconsulting.com/colin-stasiuk/2011/06/02/winds-of-change/" target="_blank">Wind of Change</a> you were both subjected to some 80s &#8220;rock&#8221; care of Scorpions and my announcement that I was leaving my then current gig for a new contract.</p>
<p>I&#8217;m now happy to formally announce that I&#8217;m the new Senior DBA for <a href="http://invidi.com" target="_blank">Invidi</a>.</p>
<p>This is an exciting opportunity for me to work with a fairly young company that has grown exponentially over the last decade to be a leader in targeted television advertising and promotion.  Invidi&#8217;s technology allows television service providers to simultaneously deliver multiple and distinct commercial streams to different households or set-top boxes during a single commercial break.</p>
<p>What that means is that 2 people watching the exact same program at the exact same time will have a different commercial stream that is suited to them.  Through the use of &#8220;Audience Classifiers&#8221; that take into account what they&#8217;re watching, gender, age, income, and geo-location and continual analysis of viewer behavior and click streams you will see a custom set of commercial that are focused to you and your interests. </p>
<p><img class="alignnone size-full wp-image-1749" title="cool" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/06/cool.jpg" alt="" width="238" height="140" /></p>
<p>Pretty cool stuff <img src='http://benchmarkitconsulting.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks to everyone for their kind words in support of my announcement.  If you&#8217;ve reached out to me via this blog, email, facebook, or twitter I appreciate all the thoughts and comments.</p>
<p>Have a great day</p>
<p>Enjoy!! (Follow me on Twitter: <a href="http://twitter.com/ColinStasiuk" target="_blank">@ColinStasiuk</a>)</p>
<p><a href="http://benchmarkitconsulting.com/" target="_blank"><img title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=My+New+Job+http://tinyurl.com/5tlftp2" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/06/13/my-new-job/&amp;title=My+New+Job" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/06/13/my-new-job/&amp;title=My+New+Job" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/06/13/my-new-job/&amp;title=My+New+Job" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2011/06/13/my-new-job/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wind of Change</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2011/06/02/winds-of-change/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2011/06/02/winds-of-change/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 14:44:40 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[Professional]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=1725</guid>
		<description><![CDATA[I know as an independent contractor change is constant but sometimes it hits you alot more than others.  I&#8217;ve been at my current &#8220;gig&#8221; for almost 3 years so deciding to wind down and leave comes with it&#8217;s fair share of emotions, emotions that I haven&#8217;t felt since I was a full-time employee. The team [...]]]></description>
			<content:encoded><![CDATA[<p><iframe width="425" height="349" src="http://www.youtube.com/embed/5KcRl1p2waM" frameborder="0" allowfullscreen></iframe></p>
<p>I know as an independent contractor change is constant but sometimes it hits you alot more than others.  I&#8217;ve been at my current &#8220;gig&#8221; for almost 3 years so deciding to wind down and leave comes with it&#8217;s fair share of emotions, emotions that I haven&#8217;t felt since I was a full-time employee.</p>
<p>The team I currently work with are awesome, professionally and personally.  I can&#8217;t say enough good things about them and I&#8217;m sure we&#8217;ll stay in touch as I wont be far away (only a few buildings over actually LOL).</p>
<p>So if the contract is great and the people are great then why the change?</p>
<p><img class="alignnone size-full wp-image-1736" title="Change" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/05/Change.jpg" alt="" width="240" height="240" /></p>
<p>When I&#8217;m happy with my current &#8220;situation&#8221; I don&#8217;t go looking for other opportunities but that being said sometimes opportunities come looking for me.  I&#8217;ve always had the point of view that you should never close yourself off fully to new opportunities.  I&#8217;ve been very blessed to have a bunch of companies approach me over the last 3 years and although I didn&#8217;t pursue any of those opportunities myself I tried to help them find a good fit through <a href="http://EDMPASS.com" target="_blank">EDMPASS</a> and its members that requested to be notified of potential new job opportunities.</p>
<p>This was one of those opportunities that found me and originally I was just going to do what I normally would do and try to help them find a good fit, but the more I heard about the company and role the more I wanted to pursue it for myself.  The interview process was quite extensive as it included a 2 part knowledge exam and an all day in person interview.  The 2 part exam got the &#8220;can this person DO the job&#8221; out of the way but the attention to team fit and personality of the all day in person interview was something that I think more companies should do (even with their contractors).</p>
<p><img class="alignnone size-full wp-image-1737" title="Wind" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/05/Wind.gif" alt="" width="216" height="143" /></p>
<p>It seems the winds of change have blown my way, I&#8217;m constantly seeing tweets and blog posts from the SQL Community about changing jobs, new opportunities, etc so I guess I&#8217;m just going to add to the pile with this one.</p>
<p>Have a great day!!</p>
<p>Enjoy!! (Follow me on Twitter: <a href="http://twitter.com/ColinStasiuk" target="_blank">@ColinStasiuk</a>)</p>
<p><a href="http://benchmarkitconsulting.com/" target="_blank"><img title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Wind+of+Change+http://tinyurl.com/3c6mv5v" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/06/02/winds-of-change/&amp;title=Wind+of+Change" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/06/02/winds-of-change/&amp;title=Wind+of+Change" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/06/02/winds-of-change/&amp;title=Wind+of+Change" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2011/06/02/winds-of-change/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Jobs Jobs Jobs</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2011/04/07/jobs-jobs-jobs/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2011/04/07/jobs-jobs-jobs/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 17:18:18 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Job Notification]]></category>
		<category><![CDATA[PBM]]></category>
		<category><![CDATA[Policy Based Management]]></category>
		<category><![CDATA[SQL Agent]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=1686</guid>
		<description><![CDATA[If a job fails in production and nobody is there to see it, does it get noticed? Deep huh? Well if the job actually does something important of course it will get noticed.  So the bigger question is: What can you do to make sure that YOU know about it before anyone else does?  Cause [...]]]></description>
			<content:encoded><![CDATA[<p>If a job fails in production and nobody is there to see it, does it get noticed?</p>
<p><img class="alignnone size-full wp-image-1687" title="deep" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/04/deep.jpg" alt="" width="294" height="220" /></p>
<p>Deep huh? <img src='http://benchmarkitconsulting.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Well if the job actually does something important of course it will get noticed. </p>
<p>So the bigger question is:</p>
<p>What can you do to make sure that <strong>YOU</strong> know about it before anyone else does? </p>
<p>Cause who likes surprise phone calls?</p>
<p><img class="alignnone size-full wp-image-1695" title="nonono" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/04/nonono.jpg" alt="" width="300" height="198" /></p>
<p>This is a multipart-answer so bare with me&#8230;</p>
<p><strong>Step 1.</strong>  Setup a Policy Based Management condition to find SQL Server Agent Jobs with NO notification on Failure</p>
<p><a href="http://benchmarkitconsulting.com/wp-content/uploads/2011/04/Condition.txt" target="_blank">DOWNLOAD CONDITION</a></p>
<p><strong>Step 2.</strong>  Setup a Policy Based Management policy to check the condition created in <strong>Step 1</strong></p>
<p><a href="http://benchmarkitconsulting.com/wp-content/uploads/2011/04/Policy.txt" target="_blank">DOWNLOAD POLICY</a></p>
<p>OK so this will do nothing more then tell you whether or not the SQL Server you are evaluating this policy against has jobs that do not have a notification on failure configured. </p>
<p>What if my SQL Server Agent has 500 jobs? How do I find the ones without failure notifications configured?</p>
<p><strong>Step 3.</strong> </p>

<div class="wp_syntax"><div class="code"><pre class="t-sql" style="font-family:monospace;">SELECT * 
FROM msdb.dbo.sysjobs 
WHERE [enabled] = 1 AND notify_level_email NOT IN (1,2,3)</pre></div></div>

<p>Fantastic <img src='http://benchmarkitconsulting.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  so what if you have 500 jobs and 499 of these jobs DO NOT have any notification on failure configured?</p>
<p><strong>Step4.</strong>  Script to update all jobs to include a notification on failure</p>
<p><strong>*** MAKE SURE YOU UNDERSTAND WHAT THIS IS DOING BEFORE RUNNING THE OUTPUT ***</strong></p>
<p><img class="alignnone size-full wp-image-1697" title="SafetyFirst" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/04/SafetyFirst.jpg" alt="" width="240" height="240" /></p>
<p>What this script will do is provide you with the commands to update <strong>ALL</strong> your jobs to notify <strong>BY EMAIL </strong>to the operator you provide in the <strong>@NotifyOperator</strong> variable</p>

<div class="wp_syntax"><div class="code"><pre class="t-sql" style="font-family:monospace;">USE [msdb] 
DECLARE @NotifyOperator nvarchar(100) 
SELECT @NotifyOperator = 'DBA' 
SELECT 'EXEC msdb.dbo.sp_update_job @job_id=N''' + convert(nvarchar(50),job_id) + ''', @notify_level_email=2, @notify_email_operator_name=N''' + @NotifyOperator + '''' FROM msdb.dbo.sysjobs</pre></div></div>

<p>Tweak this as you see fit:</p>
<ul>
<li>Include a WHERE clause to exclude or include only certain jobs</li>
<li>Change additional notification options (page? net send? etc?)</li>
</ul>
<p> So there you go&#8230; you now have:</p>
<ul>
<li>A check condition and policy to identify jobs that <strong>DO NOT</strong> have some level of notification</li>
<li>A script to identify which jobs those are</li>
<li>A script to blanket update all jobs to a particular notification level and settings.</li>
</ul>
<p>Enjoy!! (Follow me on Twitter: <a href="http://twitter.com/ColinStasiuk" target="_blank">@ColinStasiuk</a>)</p>
<p><a href="http://benchmarkitconsulting.com/" target="_blank"><img title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Jobs+Jobs+Jobs+http://tinyurl.com/64gz33g" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/04/07/jobs-jobs-jobs/&amp;title=Jobs+Jobs+Jobs" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/04/07/jobs-jobs-jobs/&amp;title=Jobs+Jobs+Jobs" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/04/07/jobs-jobs-jobs/&amp;title=Jobs+Jobs+Jobs" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2011/04/07/jobs-jobs-jobs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meme Monday</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2011/04/04/meme-monday/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2011/04/04/meme-monday/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 14:10:51 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Backups]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[Meme Monday]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=1682</guid>
		<description><![CDATA[Welcome to the first Meme Monday! Today’s meme is “Write a SQL blog post in 11 words or less”, and here is my entry: Taking backups is half the job, don&#8217;t forget to restore them Tag Time Grant Fritchey (blog @GFritchey ) Aaron Bertrand ( blog @AaronBertrand ) Jorge Segarra ( blog @SQLChicken ) Great idea [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to the first Meme Monday! Today’s meme is “Write a SQL blog post in 11 words or less”, and here is my entry:</p>
<p><em>Taking backups is half the job, don&#8217;t forget to restore them</em></p>
<p>Tag Time</p>
<ul>
<li>Grant Fritchey (<a href="http://www.scarydba.com/" target="_blank">blog</a> <a href="http://twitter.com/GFritchey" target="_blank">@GFritchey</a> )</li>
<li>Aaron Bertrand ( <a href="http://sqlblog.com/blogs/aaron_bertrand/" target="_blank">blog</a> <a href="http://twitter.com/AaronBertrand" target="_blank">@AaronBertrand </a>)</li>
<li>Jorge Segarra ( <a href="http://sqlchicken.com/" target="_blank">blog</a> <a href="http://twitter.com/SQLChicken" target="_blank">@SQLChicken</a> )</li>
</ul>
<p><a href="http://thomaslarock.com/2011/04/welcome-to-meme-monday/" target="_blank">Great idea Tom!! </a></p>
<p>Enjoy!! (Follow me on Twitter: <a href="http://twitter.com/ColinStasiuk" target="_blank">@ColinStasiuk</a>)</p>
<p><a href="http://benchmarkitconsulting.com/" target="_blank"><img title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Meme+Monday+http://tinyurl.com/3nprnxt" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/04/04/meme-monday/&amp;title=Meme+Monday" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/04/04/meme-monday/&amp;title=Meme+Monday" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/04/04/meme-monday/&amp;title=Meme+Monday" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2011/04/04/meme-monday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Change Data Capture (CDC) Easy Button</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2011/03/07/the-change-data-capture-cdc-easy-button/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2011/03/07/the-change-data-capture-cdc-easy-button/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 15:25:43 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[CDC]]></category>
		<category><![CDATA[Change Data Capture]]></category>
		<category><![CDATA[SQL 2008]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=1669</guid>
		<description><![CDATA[I&#8217;ve been working alot with CDC the last little while and found these couple of scripts very useful. These scripts are handy in a DEV type of environment&#8230; you should be alot pickier about what you use CDC for but if you&#8217;re looking to play around and get your hands dirty then these are the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-1670" title="easy-button" src="http://benchmarkitconsulting.com/wp-content/uploads/2011/03/easy-button.jpg" alt="" width="127" height="127" /></p>
<p>I&#8217;ve been working alot with CDC the last little while and found these couple of scripts very useful. These scripts are handy in a DEV type of environment&#8230; you should be alot pickier about what you use CDC for but if you&#8217;re looking to play around and get your hands dirty then these are the scripts for you. <img src='http://benchmarkitconsulting.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The first script:</p>
<ul>
<li>Checks to see if CDC is enabled</li>
<li>Enabled CDC</li>
<li>Creates an &#8220;Audit&#8221; schema</li>
<li>Add all tables to CDC</li>
<li>Create a useful CDC view for each table in the &#8220;Audit&#8221; schema</li>
<li>Change the default CDC retention period</li>
</ul>
<p>The second script tears it all down:</p>
<ul>
<li>Drops the views</li>
<li>Disables the tables from CDC</li>
<li>Drops the &#8220;Audit&#8221; Schema</li>
<li>Disables CDC from the database</li>
</ul>
<p><strong>FIRST SCRIPT</strong></p>

<div class="wp_syntax"><div class="code"><pre class="t-sql" style="font-family:monospace;">USE DB_NAME
GO
SET NOCOUNT ON
GO
DECLARE @is_cdc_enabled int
DECLARE @cdc_schema_id int
DECLARE @Role_Name nvarchar(100)
DECLARE @CDC_Retention int
DECLARE @SQL_STMT nvarchar(2000)
DECLARE @RowCount int
DECLARE @CDC_TableName nvarchar(256)
DECLARE @ColumnList nvarchar(2000)
&nbsp;
SELECT	@Role_Name = NULL
SELECT	@CDC_Retention = 13148730 -- 25 years in minutes
&nbsp;
/*
**********************************************
		ENABLE AND CONFIGURE CDC
**********************************************
*/
SELECT	@is_cdc_enabled = is_cdc_enabled
FROM	sys.databases
WHERE	[name] = DB_NAME()
&nbsp;
IF	@is_cdc_enabled != 1
BEGIN
	EXEC sys.sp_cdc_enable_db
END
&nbsp;
SELECT @SQL_STMT = 'CREATE SCHEMA [Audit] AUTHORIZATION [dbo]'
&nbsp;
IF NOT EXISTS(SELECT 1 FROM sys.schemas WHERE name = 'Audit')
BEGIN
	EXEC sp_executesql @SQL_STMT
END
&nbsp;
/*
**********************************************
		ADD TABLES TO CDC
**********************************************
*/
&nbsp;
SELECT	@cdc_schema_id = [schema_id]
FROM	sys.schemas
WHERE	[name] = 'cdc'
&nbsp;
SELECT	[name] as 'CDC_TableName'
INTO	#UserTables
FROM	sys.objects
WHERE	type = 'U' and
		is_ms_shipped != 1 and
		[schema_id] != @cdc_schema_id
&nbsp;
SELECT	@RowCount = COUNT(1)
FROM	#UserTables
&nbsp;
WHILE	@RowCount != 0
BEGIN
	SELECT TOP 1 @CDC_TableName = CDC_TableName
	FROM	#UserTables
&nbsp;
	SELECT @SQL_STMT = 'EXEC sys.sp_cdc_enable_table
      @source_schema = ''dbo'',
      @source_name   = ''' + @CDC_TableName + ''',
      @role_name     = null;'
&nbsp;
	EXEC sp_executesql @SQL_STMT
&nbsp;
	SELECT	@ColumnList = STUFF(COLUMN_NAME, 1, 1, '')
	FROM	sys.tables t CROSS APPLY  (SELECT	',' + name AS [text()]
									   FROM		sys.columns c
									   WHERE    c.object_id = t.object_id
									   FOR XML PATH('')) o (COLUMN_NAME)
	WHERE OBJECT_NAME(t.[object_id]) = @CDC_TableName
&nbsp;
	SELECT	@SQL_STMT = 'CREATE VIEW Audit.vw_' + @CDC_TableName +
			' AS     SELECT A.__$start_lsn as ''StartLSN'',
     B.tran_begin_time as ''TransactionStartTime'',
      B.tran_end_time as ''TransactionEndTime'',
      CASE
       WHEN A.__$operation = 1 THEN ''DELETE''
       WHEN A.__$operation = 2 THEN ''INSERT''
       WHEN A.__$operation = 3 THEN ''UPDATE_BEFORE''
       WHEN A.__$operation = 4 THEN ''UPDATE_AFTER''
      END as ''Operation'', ' +
      @ColumnList +
      ' FROM cdc.dbo_' + @CDC_TableName + '_CT A INNER JOIN
  cdc.lsn_time_mapping B ON A.__$start_lsn = B.start_lsn'
&nbsp;
	EXEC sp_executesql @SQL_STMT
&nbsp;
	DELETE
	FROM #UserTables
	WHERE	CDC_TableName = @CDC_TableName
&nbsp;
	SELECT @RowCount = @RowCount - 1
&nbsp;
END
&nbsp;
DROP TABLE #UserTables
&nbsp;
/*
**********************************************
		CHANGE CDC RETENTION
**********************************************
*/
&nbsp;
EXECUTE sys.sp_cdc_change_job
        @job_type = N'cleanup',
        @retention = @CDC_Retention</pre></div></div>

<p><strong>SECOND SCRIPT</strong></p>

<div class="wp_syntax"><div class="code"><pre class="t-sql" style="font-family:monospace;">/*
**********************************************
		TEAR IT DOWN SCRIPT
**********************************************
*/
USE DB_NAME
GO
DECLARE @Audit_schema_id int
DECLARE @RowCount int
DECLARE @ViewName nvarchar(256)
DECLARE @TableName nvarchar(256)
DECLARE @SQL_STMT nvarchar(2000)
&nbsp;
SELECT	@Audit_schema_id = [schema_id]
FROM	sys.schemas
WHERE	[name] = 'Audit'
&nbsp;
SELECT	name as 'ViewName'
INTO	#AuditViews
FROM	sys.views
WHERE	schema_id = @Audit_schema_id
&nbsp;
SELECT	@RowCount = COUNT(1)
FROM	#AuditViews
&nbsp;
WHILE	@RowCount != 0
BEGIN
	SELECT TOP 1 @ViewName = ViewName
	FROM	#AuditViews
&nbsp;
	SELECT @SQL_STMT = 'DROP VIEW Audit.' + @ViewName
&nbsp;
	EXEC sp_executesql @SQL_STMT
&nbsp;
	DELETE
	FROM #AuditViews
	WHERE	ViewName = @ViewName
&nbsp;
	SELECT @RowCount = @RowCount - 1
&nbsp;
END
&nbsp;
DROP TABLE #AuditViews
&nbsp;
SELECT	[name] as 'TableName'
INTO	#CDC_TrackedTables
FROM	sys.tables
WHERE	is_tracked_by_cdc = 1
&nbsp;
SELECT	@RowCount = COUNT(1)
FROM	#CDC_TrackedTables
&nbsp;
WHILE	@RowCount != 0
BEGIN
	SELECT TOP 1 @TableName = TableName
	FROM	#CDC_TrackedTables
&nbsp;
	SELECT @SQL_STMT = 'EXEC sys.sp_cdc_disable_table
      @source_schema = ''dbo'',
      @source_name   = ''' + @TableName + ''',
      @capture_instance     = N''All'';'
&nbsp;
	EXEC sp_executesql @SQL_STMT
&nbsp;
	DELETE
	FROM #CDC_TrackedTables
	WHERE	TableName = @TableName
&nbsp;
	SELECT @RowCount = @RowCount - 1
&nbsp;
END
&nbsp;
DROP TABLE #CDC_TrackedTables
&nbsp;
SELECT @SQL_STMT = 'DROP SCHEMA [Audit]'
&nbsp;
IF EXISTS(SELECT 1 FROM sys.schemas WHERE name = 'Audit')
BEGIN
	EXEC sp_executesql @SQL_STMT
END
&nbsp;
EXEC sys.sp_cdc_disable_db</pre></div></div>

<p>There ya go&#8230; now you don&#8217;t have a reason not to get in there and play around <img src='http://benchmarkitconsulting.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Enjoy!! (Follow me on Twitter: <a href="http://twitter.com/ColinStasiuk" target="_blank">@ColinStasiuk</a>)</p>
<p><a href="http://benchmarkitconsulting.com/" target="_blank"><img title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=The+Change+Data+Capture+%28CDC%29+Easy+Button+http://tinyurl.com/4aul9ll" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/03/07/the-change-data-capture-cdc-easy-button/&amp;title=The+Change+Data+Capture+%28CDC%29+Easy+Button" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/03/07/the-change-data-capture-cdc-easy-button/&amp;title=The+Change+Data+Capture+%28CDC%29+Easy+Button" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2011/03/07/the-change-data-capture-cdc-easy-button/&amp;title=The+Change+Data+Capture+%28CDC%29+Easy+Button" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2011/03/07/the-change-data-capture-cdc-easy-button/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

