<?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>Luke Hayler - SQL Server Developer</title>
	<atom:link href="http://lukehayler.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://lukehayler.com</link>
	<description>A blog about Business Intelligence and other personal interests</description>
	<lastBuildDate>Tue, 13 Dec 2011 11:42:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Gettin&#8217; my Run on again.</title>
		<link>http://lukehayler.com/2011/12/gettin-my-run-on-again/</link>
		<comments>http://lukehayler.com/2011/12/gettin-my-run-on-again/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 11:42:45 +0000</pubDate>
		<dc:creator>Luke Hayler</dc:creator>
				<category><![CDATA[Luke Hayler]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[running]]></category>
		<category><![CDATA[sqlrun]]></category>

		<guid isPermaLink="false">http://lukehayler.com/2011/12/gettin-my-run-on-again/</guid>
		<description><![CDATA[It’s bee far too long since I wore out a good pair of running shoes, but the time has come once again to do just that. I have only done one half-marathon and that was a few years ago now. &#8230; <a href="http://lukehayler.com/2011/12/gettin-my-run-on-again/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It’s bee far too long since I wore out a good pair of running shoes, but the time has come once again to do just that. I have only done one half-marathon and that was a few years ago now. I vowed then that I’d never do it again (I hit an 11mile wall that was pretty hard to get through). Times change. I want to do it again. With a view to doing a full marathon at some point ‘in the future’.</p>
<p>Today was day 1. Of many. And while it was only on a treadmill, I have started well and FEEL AWESOME! A quick 5KM in just over 30 minutes is not bad going, considering it’s been months. </p>
<p>I have the #sqlfamily to thank. #sqlrun is the driver of this change and long may you wonderful people continue to encourage others. </p>
<p>Here’s my run activity for today:</p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200">Distance</td>
<td valign="top" width="200">3.12 miles (5 KM)</td>
</tr>
<tr>
<td valign="top" width="200">Duration</td>
<td valign="top" width="200">00:30:14</td>
</tr>
<tr>
<td valign="top" width="200">Average Pace</td>
<td valign="top" width="200">09:42 min/mile</td>
</tr>
<tr>
<td valign="top" width="200">Average Speed</td>
<td valign="top" width="200">6.19 mph</td>
</tr>
<tr>
<td valign="top" width="200">Calories Burned (apparently)</td>
<td valign="top" width="200">392</td>
</tr>
</tbody>
</table>
<p><a href="http://runkeeper.com/user/lukehayler/activity/62714410">http://runkeeper.com/user/lukehayler/activity/62714410</a></p>
<p>Tomorrow brings more Downhill Mountain Biking! Woo Hoo!!</p>
]]></content:encoded>
			<wfw:commentRss>http://lukehayler.com/2011/12/gettin-my-run-on-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Social No. 2 &#8211; Movember Edition</title>
		<link>http://lukehayler.com/2011/11/sql-server-social-no-2-movember-edition/</link>
		<comments>http://lukehayler.com/2011/11/sql-server-social-no-2-movember-edition/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 20:17:06 +0000</pubDate>
		<dc:creator>Luke Hayler</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Luke Hayler]]></category>
		<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[SQL Server Social]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Sherlock Holmes Inn]]></category>
		<category><![CDATA[SQL networking]]></category>
		<category><![CDATA[sql server social]]></category>
		<category><![CDATA[sqlpass]]></category>

		<guid isPermaLink="false">http://lukehayler.com/2011/11/sql-server-social-no-2-movember-edition/</guid>
		<description><![CDATA[Last Thursday saw the first of many regular SQL Server Social events.Held at the Sherlock Holmes Inn on Collins Street, it was a great event with around 25-30 people in attendance. A lot more than I imagined considering a last &#8230; <a href="http://lukehayler.com/2011/11/sql-server-social-no-2-movember-edition/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://lukehayler.com/wp-content/uploads/2011/11/SherlockHolmesInn.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 10px 10px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SherlockHolmesInn" border="0" alt="SherlockHolmesInn" align="left" src="http://lukehayler.com/wp-content/uploads/2011/11/SherlockHolmesInn_thumb.png" width="136" height="164" /></a>Last Thursday saw the first of many regular SQL Server Social events.Held at the Sherlock Holmes Inn on Collins Street, it was a great event with around 25-30 people in attendance. A lot more than I imagined considering a last minute change to the date. </p>
<p><a href="http://www.perceptualedge.com" target="_blank">Stephen Few</a>, renown educator and trainer in BI Visualisations and author, had been giving a BI Visualisation workshop earlier in the week. I was in attendance at the workshop and managed to persuade Stephen to attend our social event. He was only in Melbourne until Friday November 18th, hence the last minute change to the date. </p>
<p>&#160;</p>
<p>It was a <a href="http://au.movember.com" target="_blank">Movember</a> themed event, but unfortunately not that many people took part. I was one of two Mo Bro’s of the evening. <a href="http://au.movember.com/mospace/755590" target="_blank">Angus Bell</a> had quite the impressive Mo and walked away with a heap of Movember merchandise (which he later gave away at another Movember party), as well as bottle of wine. It was a great effort by Angus, check out his Mo below and <a href="http://au.movember.com/mospace/755590" target="_blank">donate to his cause here</a>:</p>
<p><a href="http://au.movember.com/mospace/755590" target="_blank"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Angus Bell" border="0" alt="Angus Bell" src="http://lukehayler.com/wp-content/uploads/2011/11/AngusBell_MO.jpg" width="356" height="346" /></a></p>
<p>&#160;</p>
<p>Next month’s event is in the works and will be held, once again, at The Sherlock Holmes Inn. Dates and times will be communicated soon. Stay tuned for more on SQL Server Social!</p>
]]></content:encoded>
			<wfw:commentRss>http://lukehayler.com/2011/11/sql-server-social-no-2-movember-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Social Update &#8211; Stephen Few to join us!</title>
		<link>http://lukehayler.com/2011/11/sql-server-social-update-stephen-few-to-join-us/</link>
		<comments>http://lukehayler.com/2011/11/sql-server-social-update-stephen-few-to-join-us/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 11:12:11 +0000</pubDate>
		<dc:creator>Luke Hayler</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Luke Hayler]]></category>
		<category><![CDATA[SQL Server Social]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[melbourne]]></category>
		<category><![CDATA[sql server social]]></category>
		<category><![CDATA[sqlserversyndication]]></category>
		<category><![CDATA[Stephen Few]]></category>

		<guid isPermaLink="false">http://lukehayler.com/2011/11/sql-server-social-update-stephen-few-to-join-us/</guid>
		<description><![CDATA[That’s right. Stephen Few, the leading educator and author in data visualisation techniques, will be joining us for the November SQL Server Social event. However, in order to have Stephen join us, it has meant that I have had to &#8230; <a href="http://lukehayler.com/2011/11/sql-server-social-update-stephen-few-to-join-us/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://lukehayler.com/wp-content/uploads/2011/11/7609782-wooden-barrel1.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top: 0px; border-right: 0px; padding-top: 0px" title="7609782-wooden-barrel" border="0" alt="7609782-wooden-barrel" align="left" src="http://lukehayler.com/wp-content/uploads/2011/11/7609782-wooden-barrel_thumb1.jpg" width="240" height="288" /></a>That’s right. <a href="http://www.perceptualedge.com" target="_blank">Stephen Few</a>, the leading educator and author in data visualisation techniques, will be joining us for the <a href="http://sqlserversocial.eventbrite.com" target="_blank">November SQL Server Social event</a>.</p>
<p>However, in order to have Stephen join us, it has meant that I have had to change the date of the event. So, SQL server Social will now be held <strong>THIS THURSDAY, 17th November 2</strong><strong>011.</strong> </p>
<p>Stephen is an incredibly busy individual and travels all over the world enlightening people on data visualisation best practices, so I am privileged that he has agreed to join us. </p>
<p>I’ll be sending out updates to those of you who have already registered and will be apologising profusely. Don’t worry, if you can make it, your current registration will still stand. For those of you who can now make it, please head over to <a href="http://sqlserversocial.eventbrite.com">http://sqlserversocial.eventbrite.com</a> to sign up. Don’t forget, this is a rare opportunity to come and meet, and chat to, one of the leading experts on data visualisation.</p>
]]></content:encoded>
			<wfw:commentRss>http://lukehayler.com/2011/11/sql-server-social-update-stephen-few-to-join-us/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s Movember&#8211;Don&#8217;t forget about Men&#8217;s health!</title>
		<link>http://lukehayler.com/2011/11/its-movemberdont-forget-about-mens-health/</link>
		<comments>http://lukehayler.com/2011/11/its-movemberdont-forget-about-mens-health/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 21:54:57 +0000</pubDate>
		<dc:creator>Luke Hayler</dc:creator>
				<category><![CDATA[Luke Hayler]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[SQL Server Social]]></category>
		<category><![CDATA[movember]]></category>
		<category><![CDATA[sql server social]]></category>

		<guid isPermaLink="false">http://lukehayler.com/2011/11/its-movemberdont-forget-about-mens-health/</guid>
		<description><![CDATA[It’s Movember time again, and that means ridiculous facial hair for many men. Much to the disgust of their spouse. But it’s not about looking ridiculous, that’s just a by-product. It’s about awareness and education of men’s health. Think about &#8230; <a href="http://lukehayler.com/2011/11/its-movemberdont-forget-about-mens-health/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://mobro.co/lukehayler" target="_blank"><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 1483" border="0" alt="iPhone 1483" src="http://lukehayler.com/wp-content/uploads/2011/11/iPhone-1483.jpg" width="240" height="320" /></a></p>
<p>It’s <a href="http://au.movember.com" target="_blank">Movember</a> time again, and that means ridiculous facial hair for many men. Much to the disgust of their spouse. But it’s not about looking ridiculous, that’s just a by-product. It’s about awareness and education of men’s health. </p>
<h3>Think about this:</h3>
<blockquote><ul>
<li><font size="3"><strong>On average men die five to six years younger than women.</strong></font></li>
<li><font size="3"><strong>The suicide rate is four times higher for men than women</strong></font></li>
<li><font size="3"><strong>More than five men die prematurely each hour from potentially preventable illnesses</strong></font></li>
</ul>
</blockquote>
<p>Men’s health is all too easily forgotten or pushed by the wayside. Men are notoriously adverse to seeking medical help when they need it most; believing that they should ‘tough it out’. </p>
<p>The <a href="http://au.movember.com" target="_blank">Movember</a> campaign is all about raising awareness of men’s health issues that often get ignored; Prostate cancer and depression (in men).&#160; There are two key charities:</p>
<ul>
<li><a href="http://au.movember.com/about/beneficiary2/" target="_blank">Beyond Blue</a> </li>
<li><a href="http://au.movember.com/about/beneficiary1/" target="_blank">Prostate Foundation of Australia</a> </li>
</ul>
<p>And let’s not forget the <a href="http://au.movember.com/about/global-action-plan/" target="_blank">Movember Global Action Plan</a> that aims to accelerate prostate cancer outcomes through global research collaboration. </p>
<h3>Some stats (Because data is cool right?)</h3>
<p>The Movember campaign has been alive since 2003 and each year builds on the success of the last. It’ll be interesting to see how 2011 fares.</p>
<p><img src="http://au.movember.com/uploads/images/Home/About%20Movember/AU_Graph.jpg" /></p>
<h3>So what can <u>YOU</u> do?</h3>
<ul>
<li>Raise awareness through conversation </li>
<li>Growing a Mo and do some fundraising.</li>
<li><a href="http://au.movember.com/donate/" target="_blank">Donating to the cause</a> </li>
</ul>
<p>&#160;</p>
<h3>Fancy a party?</h3>
<p>I’m hosting an event later this month called SQL Server Social. It’s a great event. People meet, talk, drink, network and generally have a great time. This month we are turning the event into a Mo Party. It’ll be wall-to-wall, floor-to-ceiling Mos. There’ll be prizes and giveaways and even a free drink on your arrival. If you’re interested head on over to <a href="http://sqlserversocial.eventbrite.com">http://sqlserversocial.eventbrite.com</a> and register. All the details about the event are listed there too. SQL Server Social has several online presences:</p>
<ul>
<li>Twitter – <a href="http://twitter.com/sqlserversocial" target="_blank">@sqlserversocial</a> </li>
<li>Facebook – <a href="http://facebook.com/SqlServerSocial" target="_blank">Facebook.com/SqlServerSocial</a> </li>
<li>Google+ – <a href="http://gplus.to/sqlserversocial" target="_blank">gplus.to/sqlserversocial</a> </li>
</ul>
<p>&#160;</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="https://evbdn.eventbrite.com/s3-s3/eventlogos/4785696/movembercitizensheild-1.jpg" width="470" height="470" /></p>
<p>&#160;</p>
<h2 align="center">Do your bit. Grow a Mo!</h2>
]]></content:encoded>
			<wfw:commentRss>http://lukehayler.com/2011/11/its-movemberdont-forget-about-mens-health/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Social &#8211; Movember Edition!</title>
		<link>http://lukehayler.com/2011/11/sql-server-social-movember-edition/</link>
		<comments>http://lukehayler.com/2011/11/sql-server-social-movember-edition/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 23:00:00 +0000</pubDate>
		<dc:creator>Luke Hayler</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Luke Hayler]]></category>
		<category><![CDATA[SQL Server Social]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[sql server social]]></category>

		<guid isPermaLink="false">http://lukehayler.com/2011/11/sql-server-social-movember-edition/</guid>
		<description><![CDATA[It’s back! After a very successful pilot event back in May this year, SQL Server Social has been confirmed for November, so it’s time to save a date in your diary so you don’t forget. Event Details Date 24th November &#8230; <a href="http://lukehayler.com/2011/11/sql-server-social-movember-edition/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://lukehayler.com/wp-content/uploads/2011/11/7609782-wooden-barrel.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; float: left; padding-top: 0px; border-width: 0px;" title="7609782-wooden-barrel" src="http://lukehayler.com/wp-content/uploads/2011/11/7609782-wooden-barrel_thumb.jpg" alt="7609782-wooden-barrel" width="240" height="288" align="left" border="0" /></a>It’s back! After a very successful pilot event back in May this year, SQL Server Social has been confirmed for November, so it’s time to save a date in your diary so you don’t forget.</p>
<h3>Event Details</h3>
<table width="461" border="1" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="216">Date</td>
<td valign="top" width="243">24th November 2011</td>
</tr>
<tr>
<td valign="top" width="216">Time</td>
<td valign="top" width="243">5:30pm onwards</td>
</tr>
<tr>
<td valign="top" width="216">Venue</td>
<td valign="top" width="243"><a href="http://http://thesherlockholmes.com.au/" target="_blank">The Sherlock Holmes Inn</a>,<br />
415 Collins Street,<br />
Melbourne,<br />
Australia</td>
</tr>
<tr>
<td valign="top" width="216">Special Theme</td>
<td valign="top" width="243">Movember!</td>
</tr>
<tr>
<td valign="top" width="216">Eventbrite link for registration</td>
<td valign="top" width="243"><a href="http://sqlserversocial.eventbrite.com/">http://sqlserversocial.eventbrite.com/</a></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>If you are not sure what SQL Server Social is all about, you can either <a href="http://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ved=0CCAQFjAA&amp;url=http%3A%2F%2Flukehayler.com%2F2011%2F05%2Fsql-server-social-1%2F&amp;ei=B1K0TruGPMioiAeqxZjiAQ&amp;usg=AFQjCNEIuj2Gt0F6SV6dDHEsdNkXHglVyw&amp;sig2=XA99eXD-naR8i51pVv7fIA" target="_blank">read about the first event here</a>, or check out the following recap:</p>
<h3>What is SQL Server Social</h3>
<blockquote><p>SQL Server Social is a monthly event that has been created to provide SQL Server Professionals with a chance to network with industry peers, discuss predefined topics, have a little fun, have a beer and make some new friends.</p></blockquote>
<h3>What is the aim of SQL Server Social</h3>
<blockquote><p>SQL Server Social aims to build local SQL Server communities through regular social meetings, where database professionals can share their experiences and learn from their peers through open discussion.</p></blockquote>
<h3>Movember Edition</h3>
<p>This month’s edition is a special one. It’s <a href="http://www.movember.com/" target="_blank">Movember</a> and that means Mos! Here’s what the campaign is all about:</p>
<blockquote><p>During November each year, Movember is responsible for the sprouting of moustaches on thousands of men’s faces in Australia and around the world. The aim of which is to raise vital funds and awareness for men’s health, specifically prostate cancer and depression in men.</p></blockquote>
<p>For all the guys planning on attending, let’s see who has the best Mo by the 24th of this month. There’ll still be 6 days remaining until the official end of the campaign, but it’ll be good to see how you are all faring by that stage. This will be my first year participating; you can follow my ‘progress’ on my Mo page – <a href="http://mobro.co/lukehayler" target="_blank">mobro.co/lukehayler</a>. If you feel so inclined, I have also put together <a href="https://www.movember.com/au/register/details/team_id/379176" target="_blank">a team for SQL Server Social</a>, so show your support for the cause and join in!</p>
<h3>Facebook Page!</h3>
<p>SQL Server Social now has <a href="https://www.facebook.com/SqlServerSocial" target="_blank">it’s own Facebook page</a>. This page will be used to keep all the fans in the loop with updates about future events, photos from past events, links to interesting SQL-related sites, and so-on and so-forth…So if you are on Facebook why not tag along and keep up-to-date. <a href="https://www.facebook.com/SqlServerSocial" target="_blank">Check out the page here.</a></p>
<h3>Twitter!</h3>
<p>SQL Server Social is also all over twitter like a bad rash. Follow us for updates – <a href="http://twitter.com/sqlserversocial" target="_blank">@sqlserversocial</a></p>
<h3>SQL Crosswords</h3>
<p>One of the [optional] challenges for the event is to complete a SQL Server Crossword. The SQL Server Crosswords have been generously donated to our cause by John Sansom (<a href="http://www.johnsansom.com/">blog</a> | <a href="http://twitter.com/JohnSansom">@JohnSansom</a>). John is a DBA in the UK and is a frequent blogger at <a href="http://www.johnsansom.com/">www.johnsansom.com</a>. John has had several awards bestowed upon him including Microsoft’s Community Contributor 2011 and <a href="http://www.sqlserverpedia.com/">SQLServerPedia</a>’s Professional Development 2010 Winner as well as being a Rock Star Blogger (in <a href="http://thomaslarock.com/rankings/">Tom La Rock’s rankings</a>). John has a wealth of information on his blog, so do yourself a favour and go check it out.</p>
<p>See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://lukehayler.com/2011/11/sql-server-social-movember-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Journey to the PASS Summit 2011 &#8211; Part 7 &#8211; Day 2 Precon PowerShell</title>
		<link>http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-7-day-2-precon-powershell/</link>
		<comments>http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-7-day-2-precon-powershell/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 08:32:27 +0000</pubDate>
		<dc:creator>Luke Hayler</dc:creator>
				<category><![CDATA[Luke Hayler]]></category>
		<category><![CDATA[PASS Summit 2011]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[PASS Summit]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[precons]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[sqlpass]]></category>

		<guid isPermaLink="false">http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-7-day-2-precon-powershell/</guid>
		<description><![CDATA[Today was PowerShell day for me at the PASS Summit. After just 3 hours of sleep last night, I did not expect too much (from myself). However, the coffee was good and the realisation of a new skill was enough &#8230; <a href="http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-7-day-2-precon-powershell/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today was PowerShell day for me at the PASS Summit. After just 3 hours of sleep last night, I did not expect too much (from myself). However, the coffee was good and the realisation of a new skill was enough to keep me going. </p>
<p>It’s fair to say that, although the presentation was a little disjointed, I have seen the PowerShell ‘light’ and what it is capable of. I intend to follow up this precon with a hefting helping of new blogs to read and scripts to write. </p>
<p>The following are some of the notes from the precon today.</p>
<h3>What is PowerShell?</h3>
<p><a href="http://en.wikipedia.org/wiki/Windows_PowerShell" target="_blank">According to Wikipedia</a>, PowerShell is a task automation framework, that consists of a command-line shell and an associated scripting language. With PowerShell, administrators can perform administrative tasks on both local and remote machines.</p>
<ul>
<li>Cmdlets
<ul>
<li>Are specialised commands in the PowerShell environment that implement specific functions. </li>
<li>Use a verb-noun naming pattern. i.e.
<ul>
<li>Get-Command </li>
<li>Get-Children </li>
</ul>
</li>
<li>Sets of commandlets can be combined into scripts and executables. </li>
</ul>
</li>
<li>Pipeline
<ul>
<li>PowerShell implements a pipeline, which enables the output of one cmdlet to be ‘piped’ as an input to another; this is done using the ‘|’ character. </li>
</ul>
</li>
</ul>
<p>&#160;</p>
<h3>Variables in PowerShell</h3>
<p>Variables in PowerShell are declared (using ‘$’) and set in-line. There is no need to declare them up front, or set their data/object type. The variables will take on the appropriate data/object type for the result(s) that are returned. I don’t know about you, but I think that is all kinds of awesome.</p>
<p>&#160;</p>
<h3>PowerShell Profiles</h3>
<p>These help to load up certain modules/snapins when you load up PowerShell. This means you can port your profiles to any environment and be able to load into a familiar setup.</p>
<p>&#160;</p>
<h3>Comparison operators</h3>
<table border="0" cellspacing="0" cellpadding="2" width="361">
<tbody>
<tr>
<td valign="top" width="141"><strong>Operator</strong></td>
<td valign="top" width="248"><strong>Description</strong></td>
</tr>
<tr>
<td valign="top" width="141"><font color="#666666">-eq</font></td>
<td valign="top" width="248"><font color="#666666">Equal to</font></td>
</tr>
<tr>
<td valign="top" width="141"><font color="#666666">-ieq</font></td>
<td valign="top" width="248"><font color="#666666">Equal to (case-<em>insensitive</em>)</font></td>
</tr>
<tr>
<td valign="top" width="141"><font color="#666666">-ceq</font></td>
<td valign="top" width="248"><font color="#666666">Equal to (case-<em>sensitive</em>)</font></td>
</tr>
<tr>
<td valign="top" width="141"><font color="#666666">-ge</font></td>
<td valign="top" width="248"><font color="#666666">Greater than or Equal to</font></td>
</tr>
<tr>
<td valign="top" width="141"><font color="#666666">-gt</font></td>
<td valign="top" width="248"><font color="#666666">Greater than</font></td>
</tr>
<tr>
<td valign="top" width="141"><font color="#666666">-le</font></td>
<td valign="top" width="248"><font color="#666666">Less than or Equal to</font></td>
</tr>
<tr>
<td valign="top" width="141"><font color="#666666">-lt</font></td>
<td valign="top" width="248"><font color="#666666">Less than</font></td>
</tr>
</tbody>
</table>
<h3>Logical Operators</h3>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200"><strong>Operator</strong></td>
<td valign="top" width="200"><strong>Description</strong></td>
</tr>
<tr>
<td valign="top" width="200"><font color="#666666">-and</font></td>
<td valign="top" width="200"><font color="#666666">And</font></td>
</tr>
<tr>
<td valign="top" width="200"><font color="#666666">-ne</font></td>
<td valign="top" width="200"><font color="#666666">Not Equal to</font></td>
</tr>
<tr>
<td valign="top" width="200"><font color="#666666">-not</font></td>
<td valign="top" width="200"><font color="#666666">Not</font></td>
</tr>
<tr>
<td valign="top" width="200"><font color="#666666">!</font></td>
<td valign="top" width="200"><font color="#666666">Not</font></td>
</tr>
<tr>
<td valign="top" width="200"><font color="#666666">-or</font></td>
<td valign="top" width="200"><font color="#666666">OR</font></td>
</tr>
</tbody>
</table>
<p>more operator notes over at <a href="http://ss64.com/ps/syntax-compare.html">http://ss64.com/ps/syntax-compare.html</a></p>
<p>&#160;</p>
<h3>PowerShell Resources – great for those just starting out in PowerShell</h3>
<ul>
<li><a href="http://sqlvariant.com/wordpress/index.php/2010/05/powershell-week-at-sql-university-post-0/" target="_blank">PowerShell Day 0</a> </li>
<li><a href="http://sqlvariant.com/wordpress/index.php/2010/05/powershell-week-at-sql-university-post-1/" target="_blank">PowerShell Day 1</a> </li>
<li><a href="http://sqlvariant.com/wordpress/index.php/2010/05/powershell-week-at-sql-university-post-2/" target="_blank">PowerShell Day 2</a> </li>
<li><a href="http://sqlvariant.com/wordpress/index.php/2010/05/powershell-week-at-sql-university-post-3/" target="_blank">PowerShell Day 3</a> </li>
<li><a href="http://sqlvariant.com/wordpress/index.php/2011/01/powershell-week-at-sql-university-post-4/" target="_blank">PowerShell Day 4</a> </li>
<li><a href="http://sqlvariant.com/wordpress/index.php/2011/01/powershell-week-at-sql-university-post-5/" target="_blank">PowerShell Day 5</a> </li>
<li><a href="http://sqlvariant.com/wordpress/index.php/2011/01/powershell-week-at-sql-university-post-6/" target="_blank">PowerShell Day 6</a> </li>
<li><a href="http://www.scriptingguys.com">http://www.scriptingguys.com</a> </li>
<li><a href="http://www.poshcode.org">http://www.poshcode.org</a> </li>
<li><a href="http://blogs.technet.com/b/heyscriptingguy/">http://blogs.technet.com/b/heyscriptingguy/</a> </li>
<li><a href="http://www.beefycode.com/">http://www.beefycode.com/</a> </li>
<li><a href="http://www.techrepublic.com/blog/10things/10-fundamental-concepts-for-powershell-scripting/2146?tag=rbxccnbtr1" target="_blank">10 Fundamental Concepts for PowerShell Scripting</a> </li>
<li><a href="http://www.sqlservercentral.com/articles/powershell/73289/" target="_blank">Finding Free Space per data file with PowerShell</a><!--EndFragment--> </li>
<li><a href="http://sev17.com/2011/03/restore-and-relocate-database-files-using-powershell/" target="_blank">Restore and relocate database files using PowerShell</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-7-day-2-precon-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Journey to the PASS Summit 2001 &#8211; Part 6 &#8211; Day 0. Getting to Seattle.</title>
		<link>http://lukehayler.com/2011/10/journey-to-the-pass-summit-2001-part-6-day-0-getting-to-seattle/</link>
		<comments>http://lukehayler.com/2011/10/journey-to-the-pass-summit-2001-part-6-day-0-getting-to-seattle/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 08:11:42 +0000</pubDate>
		<dc:creator>Luke Hayler</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Luke Hayler]]></category>
		<category><![CDATA[PASS Summit 2011]]></category>
		<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[PASS Summit]]></category>
		<category><![CDATA[seattle]]></category>
		<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://lukehayler.com/2011/10/journey-to-the-pass-summit-2001-part-6-day-0-getting-to-seattle/</guid>
		<description><![CDATA[My awesome adventure looooooooooong frikkin’ journey to Seattle started well enough in Melbourne, Australia. Airport check-in was the start of the fun-and-games though. It took over an hour to actually check in and then I found out that the flight &#8230; <a href="http://lukehayler.com/2011/10/journey-to-the-pass-summit-2001-part-6-day-0-getting-to-seattle/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My <strike>awesome adventure</strike> looooooooooong frikkin’ journey to Seattle started well enough in Melbourne, Australia. Airport check-in was the start of the fun-and-games though. It took over an hour to actually check in and then I found out that the flight had been delayed by 2 hrs. Joy!</p>
<p>All was not lost though, as I had met Darren Gosbell (<a href="http://twitter.com/darrengosbell" target="_blank">@darrengosbell</a>) at the airport and we proceeded to have a drink and light lunch at one of the bars. We chatted about the PASS Summit quite a bit as well as the BI Maestro program/exams/certification. once we had boarded the plane, and we were underway the flight was reasonably enjoyable; as much as can be over the course of 14hrs.</p>
<p>My troubles started again in LAX (which is a dump btw). I progressed, slowly, through immigration, customs, picked up my bags and dropped them off at the baggage drop and then proceeded to check-in for my next flight to Seattle. Apparently I had no ticket for this flight. Huh. But it’s right there on my itinerary? 3 phone calls and over an hour later I was running to catch the Alaska Air flight. Thankfully I made it to the gate with 10 mins to spare. Which is all I cared about at that point. </p>
<p>The flight was only a couple of hours and I managed to dose off occasionally. When I was awake I was kept entertained by the interesting landscape of the West Coast. An I may have been dreaming when I saw this and thought “Sim City?”</p>
<p><a href="http://lukehayler.com/wp-content/uploads/2011/10/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://lukehayler.com/wp-content/uploads/2011/10/image_thumb.png" width="660" height="497" /></a></p>
<p>The mountain below is, what I can only assume, Mount Rainier. </p>
<p><a href="http://lukehayler.com/wp-content/uploads/2011/10/image1.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://lukehayler.com/wp-content/uploads/2011/10/image_thumb1.png" width="340" height="448" /></a></p>
<p>I also managed to snap this pic of Seattle right before we came in to land. I couldn’t quite believe it when it was a clear sunny day!</p>
<p><a href="http://lukehayler.com/wp-content/uploads/2011/10/image2.png"><u></u><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://lukehayler.com/wp-content/uploads/2011/10/image_thumb2.png" width="660" height="352" /></a></p>
<p>I’m in Seattle!</p>
]]></content:encoded>
			<wfw:commentRss>http://lukehayler.com/2011/10/journey-to-the-pass-summit-2001-part-6-day-0-getting-to-seattle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Journey to the PASS Summit 2011 &#8211; Part 5 &#8211; MUST have app &#8216;Guidebook&#8217;</title>
		<link>http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-5-must-have-app-guidebook/</link>
		<comments>http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-5-must-have-app-guidebook/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 06:23:38 +0000</pubDate>
		<dc:creator>Luke Hayler</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Luke Hayler]]></category>
		<category><![CDATA[PASS Summit 2011]]></category>
		<category><![CDATA[Guidebook]]></category>
		<category><![CDATA[PASS Summit]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-5-must-have-app-guidebook/</guid>
		<description><![CDATA[If you are one of the lucky ones who get to attend this year’s PASS Summit, then this is the Guidebook for your PASS Summit week. Literally – there’s an app called ‘Guidebook’. If you have an iPhone/Android smartphone. Guidebook &#8230; <a href="http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-5-must-have-app-guidebook/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you are one of the lucky ones who get to attend this year’s PASS Summit, then this is the Guidebook for your PASS Summit week. Literally – there’s an app called ‘Guidebook’. If you have an iPhone/Android smartphone. <strong><a href="http://guidebookapp.com/" target="_blank">Guidebook</a></strong> is the awesomeness that organises your week at the Summit. No question.</p>
<p>When you download <strong><a href="http://guidebookapp.com/" target="_blank">Guidebook</a></strong>&#160; and search for ‘PASS’: Bingo! There was the guide for the PASS Summit 2011. W00t! I downloaded the guide, and after having created my schedule for the week all on my phone, I figured you lot need to know about it too. The app and the guide, not my schedule; although if you <em>really </em>want that too then I guess I could share it with you. Just ask.</p>
<p>Here’s why you need Guidebook with the PASS Summit 2011 Guide:</p>
<ul>
<li>Session Schedule builder </li>
<li>After hours activities </li>
<li>About Seattle </li>
<li>Maps (floor plans) of the Convention Centre </li>
<li>Twitter (for the #sqlpass hash tag) </li>
<li>Sponsor listings </li>
<li>Speak listings </li>
<li>Exhibitor listings </li>
<li>My Schedule </li>
</ul>
<p>I have no idea who created the guide for the PASS Summit, but it’s great. Thank you!</p>
<p>If you are still not convinced, here are a couple of screen shots:</p>
<p><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-976.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="GuideBook Home Screen" border="0" alt="GuideBook Home Screen" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-976_thumb.png" width="164" height="244" /></a></p>
<p align="center"><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-977.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 977" border="0" alt="iPhone 977" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-977_thumb.png" width="164" height="244" /></a></p>
<p align="center"><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-978.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 978" border="0" alt="iPhone 978" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-978_thumb.png" width="164" height="244" /></a></p>
<p align="center"><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-979.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 979" border="0" alt="iPhone 979" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-979_thumb.png" width="164" height="244" /></a></p>
<p align="center"><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-982.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 982" border="0" alt="iPhone 982" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-982_thumb.png" width="164" height="244" /></a></p>
<p align="center"><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-980.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 980" border="0" alt="iPhone 980" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-980_thumb.png" width="164" height="244" /></a></p>
<p align="center"><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-981.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 981" border="0" alt="iPhone 981" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-981_thumb.png" width="164" height="244" /></a></p>
<p align="center"><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-984.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 984" border="0" alt="iPhone 984" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-984_thumb.png" width="164" height="244" /></a></p>
<p align="center"><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-988.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 988" border="0" alt="iPhone 988" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-988_thumb.png" width="164" height="244" /></a></p>
<p align="center"><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-986.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 986" border="0" alt="iPhone 986" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-986_thumb.png" width="164" height="244" /></a></p>
<p align="center"><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-987.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 987" border="0" alt="iPhone 987" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-987_thumb.png" width="164" height="244" /></a></p>
<p align="center"><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-983.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 983" border="0" alt="iPhone 983" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-983_thumb.png" width="164" height="244" /></a></p>
<p align="center"><a href="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-985.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="iPhone 985" border="0" alt="iPhone 985" src="http://lukehayler.com/wp-content/uploads/2011/10/iPhone-985_thumb.png" width="164" height="244" /></a></p>
<p align="center">
<p>See? It’s awesome. Go get it.</p>
]]></content:encoded>
			<wfw:commentRss>http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-5-must-have-app-guidebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Journey to the PASS Summit 2011 &#8211; Part 4 &#8211; My Pre Conference Session Picks</title>
		<link>http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-4-my-pre-conference-session-picks/</link>
		<comments>http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-4-my-pre-conference-session-picks/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 19:36:02 +0000</pubDate>
		<dc:creator>Luke Hayler</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Luke Hayler]]></category>
		<category><![CDATA[PASS Summit 2011]]></category>
		<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[PASS Summit]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[precons]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[sqlpass]]></category>
		<category><![CDATA[sqlserversyndication]]></category>

		<guid isPermaLink="false">http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-4-my-pre-conference-session-picks/</guid>
		<description><![CDATA[This is Part 4 in a series I am writing about my journey to the PASS Summit 2011. If you missed the previous entries, you can read about them here [Part 1, Part 2, Part 3]. Follow the journey on &#8230; <a href="http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-4-my-pre-conference-session-picks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://lukehayler.com/wp-content/uploads/2011/10/PASS_2011_button_180x180.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 19px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="PASS_2011_button_180x180" border="0" alt="PASS_2011_button_180x180" align="left" src="http://lukehayler.com/wp-content/uploads/2011/10/PASS_2011_button_180x180_thumb.png" width="180" height="240" /></a>This is Part 4 in a series I am writing about my journey to <a href="http://www.sqlpass.org/summit/2011/" target="_blank">the PASS Summit 2011</a>. If you missed the previous entries, you can read about them here [<a href="http://lukehayler.com/2011/08/journey-to-the-sql-pass-summit-2011-part-1/" target="_blank">Part 1</a>, <a href="http://lukehayler.com/2011/08/journey-to-sql-pass-summit-2011-part-2-logistics/" target="_blank">Part 2</a>, <a href="http://lukehayler.com/2011/09/journey-to-sql-pass-2011-part-3-speed-up-networking-at-the-pass-summit-2011-with-qr-codes/" target="_blank">Part 3</a>]. Follow the journey on twitter with the <a href="http://twitter.com/#!/search/realtime/%23j2pass2011" target="_blank">#j2pass2011</a>, and feel free to use the tag for your own journey! </p>
<h3>Pre Cons!</h3>
<p>Choosing a pre conference session for Monday/Tuesday was rather difficult. Do you choose something completely new to learn, or do you learn something new about a subject area in which you are already fairly familiar? Not to be outdone by my own questions, I chose to do one completely new subject area and one deeper dive into something I am fairly good at (but know I could be even better). Here are my picks:</p>
<ul>
<li>Keeping it local with Rob Farley (<a href="http://sqlblog.com/blogs/rob_farley/" target="_blank">Blog</a> | <a href="http://twitter.com/#!/rob_farley" target="_blank">@rob_farley</a>)– “<a href="http://www.sqlpass.org/summit/2011/Speakers/CallForSpeakers/SessionDetail.aspx?sid=1204" target="_blank">Fixing Queries with Advanced T-SQL constructs</a>” </li>
<li>Something new with Aaron Nelson (<a href="http://sqlvariant.com/wordpress/" target="_blank">Blog</a> | <a href="http://twitter.com/#!/SQLVariant" target="_blank">@SQLVariant</a>) – “<a href="http://www.sqlpass.org/summit/2011/Speakers/CallForSpeakers/SessionDetail.aspx?sid=1737" target="_blank">After 7 hours you won’t be able to shut up about PowerShell either</a>” </li>
</ul>
<p>It’s my belief that you can always improve the skills you already have and that’s why I’m going to Rob’s Pre-con. My T-SQL is pretty good, but I know there are areas that could do with some improvement. I hoping to get quite a bit out of this session. No pressure Rob!</p>
<p>I also believe that you should stretch yourself and try to learn something new every now and again. Especially when it comes to software or processes. Learning something new gives you a broader perspective and you’ll be better equipped to make the right decisions. This is why I’m taking Aaron’s Pre-con. I have only ever <em>heard</em> the great things about PowerShell can do. I’ll be looking to apply this new knowledge immediately for all the BI projects I work on. </p>
]]></content:encoded>
			<wfw:commentRss>http://lukehayler.com/2011/10/journey-to-the-pass-summit-2011-part-4-my-pre-conference-session-picks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>T-SQL Script to Identify Space Used By Each Table in a Database</title>
		<link>http://lukehayler.com/2011/09/t-sql-script-to-identify-space-used-by-each-table-in-a-database/</link>
		<comments>http://lukehayler.com/2011/09/t-sql-script-to-identify-space-used-by-each-table-in-a-database/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 21:21:16 +0000</pubDate>
		<dc:creator>Luke Hayler</dc:creator>
				<category><![CDATA[Luke Hayler]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[admin scripts]]></category>
		<category><![CDATA[sqlpass]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://lukehayler.com/2011/09/t-sql-script-to-identify-space-used-by-each-table-in-a-database/</guid>
		<description><![CDATA[There are often times that I need to do checks on the space used by databases on the server, and in particular, the tables in those databases. This is a script that I quickly put together that will return the &#8230; <a href="http://lukehayler.com/2011/09/t-sql-script-to-identify-space-used-by-each-table-in-a-database/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are often times that I need to do checks on the space used by databases on the server, and in particular, the tables in those databases. This is a script that I quickly put together that will return the following information for each of the tables in the database on which the script is run. The following information is returned:</p>
<ul>
<ul>
<li>Table Name </li>
<li>Row Count </li>
<li>Reserved Space (KB) </li>
<li>Data space used (KB) </li>
<li>Index size (KB) </li>
<li>Unused space (KB) </li>
</ul>
</ul>
<p>The above information is gathered using <a href="http://msdn.microsoft.com/en-us/library/ms188776.aspx" target="_blank">sp_spaceused</a>. Now I’m sure that there are a number of other ways to get this information, but this was quick and easy to produce and use. If you have anything that you’d like to contribute, I’d love to hear it.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 99.19%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; height: 1450px; max-height: 1450px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #008000">/***</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #008000">    Script to identify the space used by each table in a database</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #008000">    Information returned includes:</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #008000">        - Table name</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> <span style="color: #008000">        - Record Count</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span> <span style="color: #008000">        - Reserved Space (KB)</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span> <span style="color: #008000">        - Data Size (KB)</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span> <span style="color: #008000">        - Index Size (KB)</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span> <span style="color: #008000">        - Unused Space (KB)</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span> <span style="color: #008000">***/</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span> <span style="color: #008000">/* Create a table variable to hold the values returned by sp_spaceused  */</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span> <span style="color: #0000ff">DECLARE</span> @Results <span style="color: #0000ff">TABLE</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span> (</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>       RowNum            <span style="color: #0000ff">INT</span> <span style="color: #0000ff">IDENTITY</span>(1,1)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>     , TableName         <span style="color: #0000ff">VARCHAR</span>(200)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>     , Records           <span style="color: #0000ff">INT</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>     , ReservedSpace     <span style="color: #0000ff">VARCHAR</span>(100)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>     , DataSpace         <span style="color: #0000ff">VARCHAR</span>(100)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>     , IndexSizeSpace    <span style="color: #0000ff">VARCHAR</span>(100)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>     , UnUsedSpace       <span style="color: #0000ff">VARCHAR</span>(100)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>     , CheckDateTime     DateTime <span style="color: #0000ff">DEFAULT</span> GETDATE()</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span> )</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span> <span style="color: #008000">/* Declare a variable to hold the Object Names */</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span> <span style="color: #0000ff">DECLARE</span> @ObjectName <span style="color: #0000ff">VARCHAR</span>(200)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span> <span style="color: #008000">/* </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span> <span style="color: #008000">    Declare a cursor to loop through each of the tables in the database </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30">  30:</span> <span style="color: #008000">    and return their space used information. </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31">  31:</span> <span style="color: #008000">*/</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32">  32:</span> <span style="color: #0000ff">DECLARE</span> TableCursor <span style="color: #0000ff">CURSOR</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33">  33:</span> <span style="color: #0000ff">FOR</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34">  34:</span>     <span style="color: #0000ff">SELECT</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35">  35:</span>         ObjectName = TABLE_SCHEMA + <span style="color: #006080">'.'</span> + TABLE_NAME</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36">  36:</span>     <span style="color: #0000ff">FROM</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37">  37:</span>         INFORMATION_SCHEMA.TABLES</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38">  38:</span>     <span style="color: #0000ff">WHERE</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39">  39:</span>         TABLE_TYPE = <span style="color: #006080">'BASE TABLE'</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40">  40:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41">  41:</span> <span style="color: #0000ff">OPEN</span> TableCursor</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42">  42:</span>  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43">  43:</span> <span style="color: #0000ff">FETCH</span> <span style="color: #0000ff">NEXT</span> <span style="color: #0000ff">FROM</span> TableCursor</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44">  44:</span> <span style="color: #0000ff">INTO</span> @ObjectName</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum45">  45:</span>  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum46">  46:</span> <span style="color: #0000ff">WHILE</span> <span style="color: #cc6633">@@FETCH_STATUS</span> = 0</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum47">  47:</span> <span style="color: #0000ff">BEGIN</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum48">  48:</span>  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum49">  49:</span>     <span style="color: #008000">/* Execute sp_Spaceused for each table and load the results into the table variable  */</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum50">  50:</span>     INSERT <span style="color: #0000ff">INTO</span> @Results </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum51">  51:</span>     (</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum52">  52:</span>           TableName            </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum53">  53:</span>         , Records            </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum54">  54:</span>         , ReservedSpace        </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum55">  55:</span>         , DataSpace            </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum56">  56:</span>         , IndexSizeSpace    </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum57">  57:</span>         , UnUsedSpace</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum58">  58:</span>     )</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum59">  59:</span>  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum60">  60:</span>     <span style="color: #008000">/* </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum61">  61:</span> <span style="color: #008000">        Uncomment the @updateusage option if you want to ensure your stats are up-to-date</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum62">  62:</span> <span style="color: #008000">        However, this may take some time depending on the size of your database tables. </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum63">  63:</span> <span style="color: #008000">        It is set to 'false' in sp_spacedused by default.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum64">  64:</span> <span style="color: #008000">    */    </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum65">  65:</span>     <span style="color: #0000ff">EXEC</span> sp_spaceused @ObjectName</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum66">  66:</span>     --, @updateusage  = <span style="color: #006080">'true'</span>        </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum67">  67:</span>     ;    </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum68">  68:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum69">  69:</span>     <span style="color: #0000ff">FETCH</span> <span style="color: #0000ff">NEXT</span> <span style="color: #0000ff">FROM</span> TableCursor</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum70">  70:</span>     <span style="color: #0000ff">INTO</span> @ObjectName</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum71">  71:</span> <span style="color: #0000ff">END</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum72">  72:</span>  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum73">  73:</span> <span style="color: #0000ff">CLOSE</span> TableCursor</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum74">  74:</span> <span style="color: #0000ff">DEALLOCATE</span> TableCursor</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum75">  75:</span>  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum76">  76:</span> <span style="color: #008000">/*    </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum77">  77:</span> <span style="color: #008000">    Get the list of tables and their associated space usage data.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum78">  78:</span> <span style="color: #008000">    Update to your preferred format</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum79">  79:</span> <span style="color: #008000">*/</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum80">  80:</span> <span style="color: #0000ff">SELECT</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum81">  81:</span>       TableName            </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum82">  82:</span>     , Records            </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum83">  83:</span>     , ReservedSpace        = <span style="color: #0000ff">CAST</span>(<span style="color: #0000ff">SUBSTRING</span>(ReservedSpace, 1, LEN(ReservedSpace)-3) <span style="color: #0000ff">AS</span> <span style="color: #0000ff">INT</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum84">  84:</span>     , DataSpace            = <span style="color: #0000ff">CAST</span>(<span style="color: #0000ff">SUBSTRING</span>(DataSpace, 1, LEN(DataSpace)-3) <span style="color: #0000ff">AS</span> <span style="color: #0000ff">INT</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum85">  85:</span>     , IndexSizeSpace    = <span style="color: #0000ff">CAST</span>(<span style="color: #0000ff">SUBSTRING</span>(IndexSizeSpace, 1, LEN(IndexSizeSpace)-3) <span style="color: #0000ff">AS</span> <span style="color: #0000ff">INT</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum86">  86:</span>     , UnUsedSpace        = <span style="color: #0000ff">CAST</span>(<span style="color: #0000ff">SUBSTRING</span>(UnUsedSpace, 1, LEN(UnUsedSpace)-3) <span style="color: #0000ff">AS</span> <span style="color: #0000ff">INT</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum87">  87:</span> <span style="color: #0000ff">FROM</span> @Results</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum88">  88:</span> <span style="color: #0000ff">ORDER</span> <span style="color: #0000ff">BY</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum89">  89:</span>     TableName</pre>
<p><!--CRLF--></div>
</div>
<p>Copy. Paste. Enjoy.</p>
<p>&#160;</p>
<p>**UPDATE – 2011/09/14**</p>
<p>My friend Jim McLeod (<a href="http://www.jimmcleod.net" target="_blank">Blog</a> | <a href="http://twitter.com/jim_mcleod" target="_blank">Twitter</a>) has informed me that there is a better way to get the space used and row count details for objects in your database. His script utilises the sysindexes table, which means that this is compatible across a wider set of SQL Server versions including 2000/2005/2008. His original script appears in the comments below. I have reproduced it here with a little formatting, commenting and an extra table to restrict the results to just *user* tables:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 99.11%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; height: 450px; max-height: 450px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #008000">/***</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #008000">    This script will generate a list of User tables</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #008000">    and their associated space used and row count details.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #008000">***/</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span> <span style="color: #0000ff">SELECT</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>       SchemaName    = ss.name</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>     , ObjectName    = OBJECT_NAME(si.id)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     , ReservedMB    = reserved * 8/1024.0</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>     , DataMB        = dpages * 8/1024.0</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>     , RecCount      = rowcnt   </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span> <span style="color: #0000ff">FROM</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>             sysindexes si</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span> <span style="color: #0000ff">INNER</span> <span style="color: #0000ff">JOIN</span>  sys.objects so  <span style="color: #0000ff">ON</span>    si.id = so.object_id</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span> <span style="color: #0000ff">INNER</span> <span style="color: #0000ff">JOIN</span>    sys.schemas ss    <span style="color: #0000ff">ON</span>    so.schema_id = ss.schema_id</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span> <span style="color: #0000ff">WHERE</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span> <span style="color: #008000">/*    Limit the resultset to bring back Heaps &amp; Clustered indexes only </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span> <span style="color: #008000">    (Heap = 0, Clustered Index = 1)</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span> <span style="color: #008000">*/</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>     indid &lt; 2        </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span> <span style="color: #008000">/*    We only want to see the 'user' tables at this stage. </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span> <span style="color: #008000">    You can include System tables by adding 'S' to the xtype clause </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span> <span style="color: #008000">*/</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span> <span style="color: #0000ff">AND</span> type = <span style="color: #006080">'U'</span>        </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span> <span style="color: #0000ff">ORDER</span> <span style="color: #0000ff">BY</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>     SchemaName,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>     ObjectName</pre>
<p><!--CRLF--></div>
</div>
<p>I’ve left the first script in the post for comparison. Thanks Jim!</p>
]]></content:encoded>
			<wfw:commentRss>http://lukehayler.com/2011/09/t-sql-script-to-identify-space-used-by-each-table-in-a-database/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

