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

<channel>
	<title>Geeql.com</title>
	<atom:link href="http://geeql.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://geeql.com</link>
	<description>Lessons, tips, and tricks from a SQL database geeq</description>
	<lastBuildDate>Mon, 07 May 2012 23:55:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='geeql.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Geeql.com</title>
		<link>http://geeql.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://geeql.com/osd.xml" title="Geeql.com" />
	<atom:link rel='hub' href='http://geeql.com/?pushpress=hub'/>
		<item>
		<title>Now WHERE did I put that backup?</title>
		<link>http://geeql.com/2012/05/07/where-did-i-put-that-backup/</link>
		<comments>http://geeql.com/2012/05/07/where-did-i-put-that-backup/#comments</comments>
		<pubDate>Mon, 07 May 2012 23:55:23 +0000</pubDate>
		<dc:creator>tomroush</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Problem Solving]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://geeql.com/?p=105</guid>
		<description><![CDATA[Ever run into a situation where you&#8217;re in a hurry, working on a dev box, for a presentation, and you back up your database in an &#8220;easy&#8221; place, and then when it&#8217;s time to do the restore, can&#8217;t remember where you put it? Yeah, me neither&#8230; &#60;this is your cue to chuckle a bit, because [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=105&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever run into a situation where you&#8217;re in a hurry, working on a dev box, for a presentation, and you back up your database in an &#8220;easy&#8221; place, and then when it&#8217;s time to do the restore, can&#8217;t remember where you put it?</p>
<p>Yeah, me neither&#8230;</p>
<p>&lt;this is your cue to chuckle a bit, because I think we&#8217;ve all done it a time or two&gt;</p>
<p>In fact, it was Karen Lopez (<a href="https://twitter.com/#!/datachick">twitter</a> | <a href="http://blog.infoadvisors.com/">blog</a>) who got me looking for this script, and I thought I&#8217;d put it out there.  Nothing proprietary about it &#8211; it&#8217;s just a script to find a backup &#8211; but it can be useful when you&#8217;re trying to find out where in all the clutter of files you&#8217;ve got on boxes the one backup you actually need really is.</p>
<p>At any rate, some time ago I wrote this script that showed me where the last backup was of a database &#8211; run from within that database.</p>
<p>Take a look &#8211; let me know what you think.  If you can improve it, by all means, feel free to let me know that too.  Enjoy.</p>
<p>DECLARE @BACKUPNAME SYSNAME<br />
SELECT @BackupName = (<br />
SELECT     TOP (1) backupmediafamily.physical_device_name<br />
FROM         msdb.dbo.backupmediaset AS backupmediaset_1<br />
INNER JOIN        msdb.dbo.backupmediaset<br />
ON                msdb.dbo.backupmediaset.media_set_id = backupmediaset_1.media_set_id<br />
INNER JOIN        msdb.dbo.backupset<br />
ON                msdb.dbo.backupmediaset.media_set_id = msdb.dbo.backupset.media_set_id<br />
AND                backupmediaset_1.media_set_id = msdb.dbo.backupset.media_set_id<br />
INNER JOIN      msdb.dbo.backupfile<br />
INNER JOIN        msdb.dbo.backupfilegroup<br />
ON                msdb.dbo.backupfile.backup_set_id = msdb.dbo.backupfilegroup.backup_set_id<br />
ON                msdb.dbo.backupset.backup_set_id = msdb.dbo.backupfile.backup_set_id<br />
AND             msdb.dbo.backupset.backup_set_id = msdb.dbo.backupfilegroup.backup_set_id<br />
INNER JOIN        master.sys.sysdatabases<br />
ON                backupset.database_name = master.sys.sysdatabases.name<br />
INNER JOIN         msdb.dbo.backupmediafamily<br />
ON                msdb.dbo.backupmediaset.media_set_id = msdb.dbo.backupmediafamily.media_set_id<br />
AND             backupmediaset_1.media_set_id = msdb.dbo.backupmediafamily.media_set_id)<br />
print        &#8217;backupname &#8216;<br />
print        @backupname</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geeql.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geeql.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geeql.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geeql.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geeql.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geeql.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geeql.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geeql.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geeql.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geeql.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geeql.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geeql.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geeql.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geeql.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=105&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geeql.com/2012/05/07/where-did-i-put-that-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1740bcd490688976ee6c1878d0f68adf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomroush</media:title>
		</media:content>
	</item>
		<item>
		<title>Male Logic, Female Logic, how it all applies to Tech</title>
		<link>http://geeql.com/2012/03/09/male-logic-female-logic-how-it-all-applies-to-tech/</link>
		<comments>http://geeql.com/2012/03/09/male-logic-female-logic-how-it-all-applies-to-tech/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 17:19:36 +0000</pubDate>
		<dc:creator>tomroush</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Career]]></category>
		<category><![CDATA[Dealing with People]]></category>
		<category><![CDATA[Problem Solving]]></category>
		<category><![CDATA[Professional development]]></category>

		<guid isPermaLink="false">http://geeql.com/?p=98</guid>
		<description><![CDATA[It’s been said that part of being smart is knowing what you’re dumb at.  Part of being smart is letting other people know it – but – how do you say this…  There are several ways of solving problems.  I happen to know of several ways on this, and before anyone gets all PC on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=98&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It’s been said that part of being smart is knowing what you’re dumb at.  Part of being smart is letting other people know it – but – how do you say this…  There are several ways of solving problems.  I happen to know of several ways on this, and before anyone gets all PC on me on this next bit, hear me out.  There is nothing I admire more than someone who can think their way through a problem to a solution.  I love it if they can explain it – but if they get the answer, awesome.  Now a word used to describe problem solving like this logic.  Many years ago, Bill Cosby did a little schtick on Male Logic and Female Logic – and the way he said it, the male logic was very – well, ‘logical’.  If there was a 10 step process to go through, well, it took 10 steps to go through it.</p>
<p>It went something like this:</p>
<p><strong>Male logic</strong></p>
<p>One… &lt;click&gt;</p>
<p>Two…&lt;click&gt;</p>
<p>Three…&lt;click&gt;</p>
<p>… all the way up to 10.</p>
<p>It was simple, elegant, and – to be honest, some might consider it a little boring…</p>
<p><strong>Female logic</strong></p>
<p>Now female logic, he said, was a lot different – and, as much as people want to think men and women are the same, we’re not – not by a long shot.  He pointed out that giving a female the very same 10 step process, she’d go at it like this:</p>
<p>One…&lt;click&gt;</p>
<p>Fourteen…&lt;click&gt;</p>
<p>10.</p>
<p>How the <strong>heck</strong> did that happen?</p>
<p>In fact, ladies out there – how do you <em>do</em> that?</p>
<p>See – that 14 is COMPLETELY outside our frame of reference, we don’t think about it – it’s not there.  We can ask you how or why it happens, but explaining to someone the concept of 14 when the numbers only go up to 10 is just baffling to us guys – and the way you relate things together that have you making connections and drawing conclusions that we might not see gives you a stunning edge in some incredible areas.</p>
<p>Call it intuition.  Call it what you will, but and it’s like women have a math coprocessor or something so they can shove a problem over there, let it get solved, and come back in a bit with an answer that <em>even they don’t know how they got. </em></p>
<p><em>And </em>often the guy’s on step 3, the gal’s at 10,</p>
<p>In fact, I gave the bulk of this blog post as part of a presentation once and got an astonishing piece of feedback from a woman who had “made it” in the industry.  It came to me sanitized, and I couldn’t tell you who it was if I wanted to, but what you read above was written by a guy, me.  What you’ll read below was written by a gal, is in her words, and she quite literally wished to remain anonymous.</p>
<p style="padding-left:30px;">When I ended up in the technology industry, I was usually the first female technical peer any of the guys had worked with, and the first technical female any of the (universally male) managers had tried to manage, and it gets ugly when you&#8217;re asked for status and all of the guys are all at steps 2-4 and you&#8217;re doing something &#8230; completely different.   It&#8217;s ugly then, and it&#8217;s uglier when, without being able to explain it or teach it &#8230; you get at least the same result, faster.  And as you gain confidence, much faster. I still remember being assigned to teach a pretty talented guy who have had all the right experience and skills, how to triage a network sniffer trace.  In my mind it starts with &#8220;you scroll quickly through the packets looking for something that&#8217;s not quite right&#8221; &#8230; and I knew the exercise was doomed when I looked at his notebook and he&#8217;d neatly written &#8220;Step 1.&#8221; I knew then I would never be able to explain the concept of not really reading, just relaxing with cup of coffee and scrolling through, knowing that your subconscious will throw up an alert if it sees something that&#8217;s &#8220;not quite right&#8221;. There&#8217;s your &#8220;skip to #14&#8243; bit &#8211; I can write or use a parsing app for a network trace, but before I go the effort, I&#8217;ll just use my eyes.  Sit back with a cup of coffee and scroll through the trace, looking for patterns that &#8220;aren&#8217;t quite right&#8221;.  I&#8217;m not looking closely, I haven&#8217;t the slightest notion what I&#8217;m looking for, and when something strikes me as &#8220;not quite right&#8221; it can take me some time to figure out exactly why, but it&#8217;s often not the sort of thing I could have ever found using traditional analytics and parsing tools.</p>
<p style="padding-left:30px;">I was just thrilled to find this info.  It proved my point, not that men are better or women are better. But that they’re different, and that difference needs to be recognized, acknowledged, even if, as guys, we may not completely understand it.</p>
<p>In fact, please understand – this is not a jab at either gender.  There’s no way I’d say one is right or wrong, they’re just different.   And this whole “14” thing – women seeing/feeling/perceiving relationships intuitively where men might not see them in the same way, I think, honestly, that’s why, while IT is traditionally a male dominated field, that database administration (hint: <em>relational</em> databases…) seems to have a greater percentage of females in it.</p>
<p>So, is there more to the story? Yes, there is.</p>
<p>In a nutshell: just because a guy doesn’t understand the existence of 14 doesn’t mean her 14 isn’t valid.</p>
<p>And just because a gal can’t explain the 14 to a guy doesn’t mean he’s an idiot.</p>
<p>It takes a wise manager to see that the problem-solving skills that employees bring to the technical table, whether 1-2-3-4-5-6-7-8-9-10 or 1-14-10, can actually be quite complimentary.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geeql.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geeql.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geeql.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geeql.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geeql.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geeql.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geeql.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geeql.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geeql.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geeql.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geeql.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geeql.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geeql.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geeql.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=98&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geeql.com/2012/03/09/male-logic-female-logic-how-it-all-applies-to-tech/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1740bcd490688976ee6c1878d0f68adf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomroush</media:title>
		</media:content>
	</item>
		<item>
		<title>One Secret to Success</title>
		<link>http://geeql.com/2011/12/08/one-secret-to-success/</link>
		<comments>http://geeql.com/2011/12/08/one-secret-to-success/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 16:00:32 +0000</pubDate>
		<dc:creator>tomroush</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Dealing with People]]></category>
		<category><![CDATA[Lessons I learn from my kids]]></category>
		<category><![CDATA[Ponderings]]></category>
		<category><![CDATA[Professional development]]></category>

		<guid isPermaLink="false">http://geeql.com/?p=83</guid>
		<description><![CDATA[When my son was little – about 2, we went out to the Pacific coast of Washington State and stayed in a vacation house for a few days.  He got to run on the beach, play with things he&#8217;d never played with, and just really, really had a good time.  It was wonderful to watch.  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=83&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When my son was little – about 2, we went out to the Pacific coast of Washington State and stayed in a vacation house for a few days.  He got to run on the beach, play with things he&#8217;d never played with, and just really, really had a good time.  It was wonderful to watch.  For those of you who have children, you&#8217;ll recognize this.</p>
<p>He was also at this stage in life where he just wanted to do everything <em>by himself</em> – and, for those of you who have children, you’ll recognize some of this, too.</p>
<p>He was a “big boy” now, and he wanted to take care of things in a “big boy” way, so when he had to go take care of some, shall we say, personal business, he wanted to do it, as he said, “all by myself”.</p>
<p>And so, like many parents, I waited for him to call me and tell me he was done, so I could help him finish up the paperwork, so to speak.  And he didn’t call, and didn’t call, and didn’t call.</p>
<p>Finally I called in and asked if he was okay.  I heard a strained, “I’m fine!” – and then silence.  Then I heard a thump, followed by another thump.</p>
<p>Hmmm…</p>
<p>Silence followed by thumps is never good.  It seemed like it was time to go check on him, so I rushedin to see what was the matter – and in half a second I could see what had happened.</p>
<p>He’d been sitting on the toilet – the “grownup” toilet that everyone else used, not the little one he would normally use, and he’d been holding himself up with his hands to keep from falling in.</p>
<p>When he was done, wanting to be a “grownup”, he skootched himself forward until he could get off, but in doing so, left quite a bit of &#8220;evidence&#8221; on the toilet seat, the front of the toilet, and all the way up his back that he’d done so.  It was clear he’d lost his balance a bit as he was trying to stand and had bumped into the wall, leaning there to hold himself up.</p>
<p>The, um,  evidence was there, too.</p>
<p>He was standing there in the middle of the bathroom, ‘pullups’ down around his feet, surveying the scene when I rushed in and saw the whole thing.  I could clearly see what had happened based on what I just described, but instinctively wanting to confirm it, I blurted out, “Michael!  What happened?!”</p>
<p>His answer was priceless…</p>
<p>“Well, Papa.  Sometimes… things go wrong.”</p>
<p>There it was, plain and simple. “Sometimes, things go wrong.”</p>
<p>Despite the best of intentions, despite the best will in the world, as he said, “Sometimes, things go wrong.”</p>
<p>People make mistakes, or don’t live up to our expectations.</p>
<p>Things go wrong.</p>
<p>Things break, or don’t work like we expect.</p>
<p>Things go wrong.</p>
<p>No matter what we do in life&#8230;</p>
<p>Sometimes&#8230;</p>
<p>Things go wrong.</p>
<p>So how do you handle it when they do?</p>
<p>And, when you have a simple acknowledgement of the fact up front, how on earth can you be angry?</p>
<p>How do you – at work or at home &#8211; handle it when things go wrong?</p>
<p>What, if you were faced with that situation I mentioned, would be the most important thing?</p>
<p>Seems like they’d be like this, in order:</p>
<ol>
<li>Clean up Michael (as in: clean up the source of the – we’ll call it “evidence”)</li>
<li>Clean up the toilet seat (as in: make sure things are functional again)</li>
<li>Clean up the wall (as in: take care of any – we’ll call it ‘collateral damage’ here)</li>
<li>This one’s incredibly important: Remember:  sometimes, THINGS GO WRONG – equipment breaks or wears out, code for our computers has bugs in it, and humans, both personally and professionally, are not perfect.</li>
</ol>
<p style="padding-left:60px;">Yelling at my son about making a mess he already told me he didn’t mean to make wasn’t going to solve anything.</p>
<p style="padding-left:60px;">Managers yelling at employees when things go wrong generally don’t have much of a good result either, nor, often, does yelling in personal situations.</p>
<p style="padding-left:60px;">The important thing there was to help clean up the mess, then reassure him and let him know that everything was okay.  Just like you need to reassure and encourage the people involved so they’re not afraid to, shall we say, ‘get back in the saddle’.</p>
<p style="padding-left:60px;">And this takes us to&#8230;</p>
<p style="padding-left:30px;">5.     if you want to keep this kind of thing from happening again:</p>
<p style="padding-left:60px;"><strong>Personally</strong>: I can’t stress the importance of communication – not just speaking, but being willing to listen.  I&#8217;ll be the first to admit I&#8217;m not perfect in this and have definitely made my share of mistakes.</p>
<p style="padding-left:60px;">And realize yours might not be the only right view there.  (Yes, hard as it is to understand this in the moment,  it’s possible for two people to be right about something – and still disagree with each other). Often, one will be thinking short term, one long term.  Or, one may be thinking, we&#8217;ll call it &#8216;rationally&#8217; while the other is thinking &#8216;emotionally&#8217;.</p>
<p style="padding-left:60px;">Note: One is just as valid as the next.</p>
<p style="padding-left:60px;"><strong>Professionally</strong>: Communication here is just as critical.  You might have one person thinking long term, but unable to articulate it, while another is focused on the immediate problem, and is more vocal.</p>
<p style="padding-left:60px;">Both are valid.</p>
<p style="padding-left:60px;">Be sure to listen to the quiet people in your organization.  Make sure your people are equipped with the proper tools to do the job they&#8217;re expected to do.  Going back to my son&#8217;s analogy, it’s good to make sure the saddle’s the right size in the first place.  Instead of your people using all their strength to keep from falling into a place they’d rather not be because the hole – or the responsibility – is too big, make sure they have the skills (read: training)  to be big enough to keep from falling in in the first place.</p>
<p>Does that make sense?</p>
<p>There are many ways to handle situations like this, but for those of you doing management of some kind, understand that the minds of your employees are the most vital things you have.  Most often, it’s in there that the solutions to the problems lie.  Making them quake in fear of you isn’t a productive use of your time, isn’t a productive use of their skills, and doesn’t make them feel comfortable getting, as I said, ‘back in the saddle’.</p>
<p>So.</p>
<p>Respect them for their skills.</p>
<p>Forgive them for their mistakes.</p>
<p>Put the past where it belongs, behind you, and in doing so, you’ll help them learn, and you’ll teach them something far, far more valuable than you realize.</p>
<p>You’ll teach them they can trust you to have their back when they need you.</p>
<p>You’ll teach them they can take risks and fail, and not worry about their jobs.</p>
<p>But in setting them up like that – they’ll also feel comfortable right at the edge of their skill envelope, and, as one leader (the former CIO of the company I work for (yes, this means you, Dale) once said, “it’s when you’re at the edge of your envelope that you make mistakes, but that’s also where you learn the most.  Yes, sometimes you fail, but sometimes you succeed beyond your wildest dreams.”</p>
<p>He was right, and I appreciated that sentiment more than I ever really found words for.</p>
<p>It also boggled my mind that someone, with all the education he had, with all the experience he had, at the peak of his career in a company could come to the same conclusion that my then two year old son came up with on his own.</p>
<p>It shouldn&#8217;t be that hard for those of us somewhere between the two to come to similar conclusions, should it?</p>
<p>in fact, it seems like a huge part of success comes from understanding, and accepting, that&#8230;</p>
<p>Sometimes…</p>
<p>Things go wrong.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geeql.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geeql.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geeql.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geeql.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geeql.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geeql.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geeql.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geeql.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geeql.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geeql.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geeql.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geeql.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geeql.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geeql.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=83&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geeql.com/2011/12/08/one-secret-to-success/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1740bcd490688976ee6c1878d0f68adf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomroush</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Family – (and SQL meme Mondays)</title>
		<link>http://geeql.com/2011/11/07/sql-family-%e2%80%93-and-sql-meme-mondays/</link>
		<comments>http://geeql.com/2011/11/07/sql-family-%e2%80%93-and-sql-meme-mondays/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 22:01:28 +0000</pubDate>
		<dc:creator>tomroush</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Career]]></category>
		<category><![CDATA[Dealing with People]]></category>
		<category><![CDATA[Ponderings]]></category>

		<guid isPermaLink="false">http://geeql.com/?p=77</guid>
		<description><![CDATA[Tom LaRock’s (blog&#124;twitter) question this month: What does SQLfamily mean to me? Interesting concept – this SQLfamily thing, one I hadn’t really thought of, but the longer I stay in it, the more I understand it, and the more I learn there is to understand. When I first started out in IT, I found myself [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=77&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Tom LaRock’s (<a href="http://thomaslarock.com/2011/11/meme-monday-for-november/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+SQLRockstar+%28SQLRockstar%29&amp;utm_content=Google+Reader" target="_blank">blog</a>|<a href="http://www.twitter.com/sqlrockstar" target="_blank">twitter</a>) question this month: What does SQLfamily mean to me?</p>
<p>Interesting concept – this SQLfamily thing, one I hadn’t really thought of, but the longer I stay in it, the more I understand it, and the more I learn there is to understand.</p>
<p>When I first started out in IT, I found myself reaching up to the people who’d been here longer than me, always reaching, learning, growing.</p>
<p>I’ve found that lately, while the reaching, learning and growing hasn’t stopped, there’s another aspect to it now.  I’m reaching, learning and growing – but reaching back, and learning a lot by teaching some of the people who are coming up the ranks behind me.  I learn so much from teaching, because I actually have to explain why I do something, and often, in that very act – understand it better myself.</p>
<p>I can’t tell you how many times the exercise of having to explain something has helped me understand it – even if it’s trying to explain a problem I’m having and am asking for help on.  One place I worked, the lead dba there would see me show up at his desk, with a puzzled look on my face, say thank you, and leave (leaving my puzzled look on his face).  Turns out that just in trying to figure out <strong>how</strong> to ask him the question, I’d figured it out for myself.</p>
<p>I’ve dealt with folks who are wonderful at answering questions, and folks that taught me much, not only in the basics, but also learning how to learn.</p>
<p>I’ve also dealt with folks who are the SQL equivalent of curmudgeons (nicest word I could think of) – and like it or not, learned from them.</p>
<p>It’s just like a regular family.  Some functional… some dysfunctional… All the wonderful fruits and nuts we’re used to dealing with in our own families.</p>
<p>And that’s part of it, right? We’re all human, we make mistakes, and things go wrong, often at the worst possible moment.  Having that SQL family out there is like having someone you can depend on – even if it’s not technical, but “just” moral support.</p>
<p>In fact, I’m training a new fellow here in the company, we’ve been troubleshooting a horked out master database on an old box that should have been put out of our misery a long time ago, and of course, I’m trying to distill years of “don’t believe the UI” into a simple “because” statement, and it’s challenging – but he’s part of the SQL family, and so while I teach him, he helps me, and it turns out he’s training others.</p>
<p>And that’s cool.</p>
<p>It’s… It’s a “Circle of Life” kind of thing…</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geeql.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geeql.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geeql.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geeql.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geeql.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geeql.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geeql.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geeql.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geeql.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geeql.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geeql.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geeql.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geeql.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geeql.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=77&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geeql.com/2011/11/07/sql-family-%e2%80%93-and-sql-meme-mondays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1740bcd490688976ee6c1878d0f68adf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomroush</media:title>
		</media:content>
	</item>
		<item>
		<title>Cool</title>
		<link>http://geeql.com/2011/11/04/cool/</link>
		<comments>http://geeql.com/2011/11/04/cool/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 16:52:39 +0000</pubDate>
		<dc:creator>tomroush</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Consistency]]></category>
		<category><![CDATA[Ponderings]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://geeql.com/?p=71</guid>
		<description><![CDATA[When it comes to software – the word “cool” has been used so often, and &#8211; and I just can’t do it. There are a few applications that are mind bending in how useful they are, how they connect dots that were never connectable before, but for the most part, I cannot bring myself to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=71&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When it comes to software – the word “cool” has been used so often, and &#8211; and I just can’t do it.</p>
<p>There are a few applications that are mind bending in how useful they are, how they connect dots that were never connectable before, but for the most part, I cannot bring myself to utter the word “cool” about most of the software out there.</p>
<p>I’ll tell you why – and as always it begins with a short story.</p>
<p>Back in – well, a few years back… my sister and I worked for a little software company that had been started by a couple of college dropouts and was being run in a small town just east of Seattle.</p>
<p>She and I had both also managed to drag our parents out of what we thought was the stone age and had gotten them a computer, and we spent hours, days, weeks going over and over and over with them what an “icon” was, the concept of “clicking and dragging”, and the realization that “just because you didn’t see it, doesn’t mean it’s gone.”  I’m sure some of you out there have worked with your parents in this way.  Doing “support” calls, leaning back in your chair, eyes closed, one hand holding the phone, the other holding your head, the bottle of aspirin nearby, trying to project this voice of calm and reason to a parent who simply doesn’t “get it”.</p>
<p>Now – understand – this is not to slam parents or their generation.  Oh, Lordy &#8211; That’s the <strong>last</strong> thing I’d want to do.  The thing that’s difficult is translating what you know and take for granted into something that’s so unfamiliar to them (if they can’t see it and feel it, it must not be there, right?) to something they can relate to and understand – without having them go over the edge in frustration.  I’ve had a couple of calls with my mom that lasted two hours (almost as much time as it would take to drive down there, do it, and drive back) – and they were often things we in the IT world would call ridiculously simple – copying and pasting, for example, was one thing my mom’s had trouble with.  But try explaining it to someone without using computer terms – to someone who grew up in another country, another culture, who’s never actually copied and pasted – and it becomes a bit of a challenge, and you have to make sure the concept itself is clear before you try to explain the mechanics of it.  She’s got a device that allows her to browse the Web from her TV as well as that computer we got her – and of course the commands for one can’t be consistent with the commands for the other – so that makes it hard to assume that something will just simply work as you expect it to.  It can get frustrating – on both sides.</p>
<p>But a little note – nay – reminder for anyone out there who gets frustrated at explaining something technical to your parents – well, I can’t speak for your parents specifically, so I’ll speak generally:</p>
<p>These are the folks who quite literally dealt with your crap.  These are the folks who changed your diapers, who changed work schedules to take you to or be at your school events growing up, who fixed thousands of sack lunches, who helped with last minute school projects, who listened to your dreams as you became a teenager, and did what they could to keep food on the table, and a roof ­­­over your head… And they smiled that proud, gut wrenchingly bittersweet smile parents get as they watched your car – or bus – or whatever – leave that one time that neither of you really knew would be the last time you’d ‘live at home’ &#8211; A little bit of a support call to help them out is the <strong><em>least</em></strong> I can do.   I do not for one moment regret the time spent on the calls I get from my mom on computer problems.</p>
<p>After about a year and a half, mom and dad knew how to use the computer, the “support calls” were fewer, and they were actually able to write letters and stories and the like.  It was kind of a neat feeling – almost like the shoe was on the other foot – me watching them “grow up” – so to speak, instead of them watching me.</p>
<p>But one day, at work, when a developer wanted to show me something new he’d written – I just about flipped.</p>
<p>See, he’d written this snippet of code, that did something… and to this day I can’t remember what it was – but he ran it, showed me what it did, and then said, with eyes just beaming with excitement, “Tom, isn’t that COOOOOOOOL?”</p>
<p>I understand that feeling.  I’ve written little snippets of code that solve problems in rather ingenious ways – but even as I sit here, writing this, I still remember that sinking feeling I had in the pit of my stomach when I heard him say that…</p>
<p>Given where I worked, and given what I knew of software development, I knew that this little “cool” thing would make it into an operating system at some point, and soon.</p>
<p>And it would fundamentally change how my parents had to work.  And it would mean more telephone calls, to explain something that someone had changed.</p>
<p>Not because it made something better.</p>
<p>Not because it made it easier.</p>
<p>Not even because it made it faster.</p>
<p>But because it made something “cool”.</p>
<p>See, there seems to be a misunderstanding of the purpose of writing software.</p>
<p>My take is that you write software to use it.  And if you use it at work, it should make your work faster, more efficient, more streamlined.  If you use it at home, it should solve problems and make it take less time to do things (think putting together a photo album, balancing your checkbook, or trying to find out where your 401K went).</p>
<p>Here’s the deal: Software Should <span style="text-decoration:underline;">Simply Work</span>.</p>
<p>Period.</p>
<p>Make it do what it’s supposed to do first.</p>
<p>If developers write code with the understanding that it is to be used by people, and that it should make their lives easier – then they have it nailed.</p>
<p>If developers write code only to show off their prowess, or only to show off their ingeniousness to other developers, then they’ve forgotten who their audience is, and that misses things entirely.</p>
<p>So… what’s ‘cool’?</p>
<p>An application that solves a problem and does it well.</p>
<p>That’s cool.</p>
<p>An application that is easy to learn and intuitive for a first time user, and at the same time, just surprises you with deeper and deeper little snippets of usefulness that solve a problem you didn’t even know you had, just as you realize you have it.</p>
<p>That’s cool.</p>
<p>Oh – and last but most certainly not least: An application that works consistently enough like the old version of the same application so users don’t have to relearn everything they’ve learned to be as efficient with the new version as they were with the old.</p>
<p>THAT’s cool.</p>
<p>I don’t want shiny sparkly crap in my software.  I don’t want context sensitive menus where I have to know what I’m looking for in order to find it (hint: the whole ribbon thing did nothing to increase productivity for a long honking time.)</p>
<p>And there you go.</p>
<p>Software should be written for the user, and with the user in mind.  Anything that gets in the way of that, no matter how glitzy, no matter how sparkly and shiny – misses the point altogether.</p>
<p>&#8212;&#8211;</p>
<p>…and there is a post script to this story…</p>
<p>Last year, my mom was working on her Christmas letter – in Microsoft Word, and she wanted to send it to someone to do some proof reading.</p>
<p>Before, she’d had to go through a web interface on her computer to get to email – and sending the text of a document involved copying all the text in the document, opening the web email interface, creating a new outgoing mail, putting in the address, tabbing a couple of times, typing in the subject, one more tab, then a paste.  It worked, but it was pretty convoluted.</p>
<p>Then I got Outlook Express configured on her box, so now when she wants to send a document, it’s a matter of going up to the file menu in Word, choosing send, typing in the name, and then hitting the send button.</p>
<p>The first time she did that she was floored.  “That’s so EASY!” and then, remembering this story, she changed that just a bit…</p>
<p>“That’s so COOOOL!!!”</p>
<p>And she’s been rubbing it in ever since.</p>
<p>So even though the people who made Outlook Express 6 work with Word 2003 on Windows XP are probably long moved on from those projects, a note of thanks to the architects, devs, testers, PM’s, and managers who shepherded those things all the way through to RTM:  Ya done good.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geeql.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geeql.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geeql.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geeql.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geeql.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geeql.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geeql.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geeql.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geeql.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geeql.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geeql.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geeql.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geeql.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geeql.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=71&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geeql.com/2011/11/04/cool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1740bcd490688976ee6c1878d0f68adf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomroush</media:title>
		</media:content>
	</item>
		<item>
		<title>It&#8217;s just ones and zeroes, right?</title>
		<link>http://geeql.com/2011/09/30/its-just-ones-and-zeroes-right/</link>
		<comments>http://geeql.com/2011/09/30/its-just-ones-and-zeroes-right/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 03:01:54 +0000</pubDate>
		<dc:creator>tomroush</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Ponderings]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://geeql.com/?p=57</guid>
		<description><![CDATA[So I was debugging some rather frustrating code the other day, and it got me to thinking – and I know, it’s dangerous, but still, I did it… I knew that the whole thing about our lives as computer professionals involves ones and zeroes.  So I thought, “Hmmm… I wonder what this code would look [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=57&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I was debugging some rather frustrating code the other day, and it got me to thinking – and I know, it’s dangerous, but still, I did it…</p>
<p>I knew that the whole thing about our lives as computer professionals involves ones and zeroes.  So I thought, “Hmmm… I wonder what this code would look like if I translated it into binary? And how easy it would be to debug?”</p>
<p>So I did that, and was overloaded with a bunch of binary, so then took a simple backup script and translated that.  The result, below, is what the computer sees when it executes this little backup script.</p>
<p>Note: what’s below, translated from t-SQL into binary, is code that worked.  (yes, you&#8217;ll have to scroll for a bit, but there&#8217;s some human readable stuff in the middle, and some more at the end&#8230;)</p>
<p>01110011 01100101 01101100 01100101 01100011 01110100 00100000 01000000 01000000 01110011 01100101 01110010 01110110 01100101 01110010 01101110 01100001 01101101 01100101 00001101 00001010 01100100 01100101 01100011 01101100 01100001 01110010 01100101 00100000 01000000 01110011 01100101 01110010 01110110 01100101 01110010 01101110 01100001 01101101 01100101 00001001 00001001 01110110 01100001 01110010 01100011 01101000 01100001 01110010 00101000 00110011 00110000 00101001 00001101 00001010 01100100 01100101 01100011 01101100 01100001 01110010 01100101 00100000 01000000 01101001 01101110 01110011 01110100 01100001 01101110 01100011 01100101 01101110 01100001 01101101 01100101 00001001 01110110 01100001 01110010 01100011 01101000 01100001 01110010 00101000 00110011 00110000 00101001 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01110010 01100101 01110000 01101111 01110010 01110100 01100101 01111000 01100101 01100011 01110101 01110100 01100101 00100000 00100000 01110110 01100001 01110010 01100011 01101000 01100001 01110010 00101000 00110001 00110000 00101001 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01100100 01100010 01101110 01100001 01101101 01100101 00100000 00100000 00100000 00100000 00100000 00001001 01110110 01100001 01110010 01100011 01101000 01100001 01110010 00101000 00110001 00110000 00110000 00101001 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01100010 01100001 01100011 01101011 01110101 01110000 01101110 01100001 01101101 01100101 00100000 00100000 00100000 00100000 00100000 01010110 01000001 01010010 01000011 01001000 01000001 01010010 00100000 00101000 00110101 00110000 00101001 00100000 00100000 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01100011 01101101 01100100 00100000 00100000 00100000 00100000 00100000 00100000 00100000 00100000 00001001 01010110 01000001 01010010 01000011 01001000 01000001 01010010 00101000 00110100 00110000 00110000 00110000 00101001 00100000 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01110011 01101111 01110101 01110010 01100011 01100101 01110000 01100001 01110100 01101000 00100000 00100000 00100000 00100000 00100000 01110110 01100001 01110010 01100011 01101000 01100001 01110010 00101000 00110010 00110101 00110000 00101001 00100000 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01110100 01100001 01110010 01100111 01100101 01110100 01110000 01100001 01110100 01101000 00100000 00100000 00100000 00100000 00100000 01110110 01100001 01110010 01100011 01101000 01100001 01110010 00101000 00110010 00110101 00110000 00101001 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01101110 01101111 01110111 00100000 00100000 00100000 00100000 00100000 00100000 00100000 00100000 00001001 01000011 01001000 01000001 01010010 00101000 00110001 00110100 00101001 00100000 00100000 00100000 00001101 00001010 00001101 00001010 01110011 01100101 01101100 01100101 01100011 01110100 00100000 01000000 01110011 01100101 01110010 01110110 01100101 01110010 01101110 01100001 01101101 01100101 00100000 00111101 00100000 00101000 01110011 01100101 01101100 01100101 01100011 01110100 00100000 01110110 01100001 01101100 01110101 01100101 00100000 01100110 01110010 01101111 01101101 00100000 01100100 01100010 01100001 00101110 01100100 01100010 01101111 00101110 01010011 01100101 01110010 01110110 01100101 01110010 01010000 01110010 01101111 01110000 01100101 01110010 01110100 01101001 01100101 01110011 00100000 01110111 01101000 01100101 01110010 01100101 00100000 01100100 01100001 01110100 01100001 00100000 00111101 00100000 00100111 01010011 01100101 01110010 01110110 01100101 01110010 01001110 01100001 01101101 01100101 00100111 00101001 00001101 00001010 01110011 01100101 01101100 01100101 01100011 01110100 00100000 01000000 01101001 01101110 01110011 01110100 01100001 01101110 01100011 01100101 01101110 01100001 01101101 01100101 00100000 00111101 00101000 01110011 01100101 01101100 01100101 01100011 01110100 00100000 01110110 01100001 01101100 01110101 01100101 00100000 01100110 01110010 01101111 01101101 00100000 01100100 01100010 01100001 00101110 01100100 01100010 01101111 00101110 01010011 01100101 01110010 01110110 01100101 01110010 01010000 01110010 01101111 01110000 01100101 01110010 01110100 01101001 01100101 01110011 00100000 01110111 01101000 01100101 01110010 01100101 00100000 01100100 01100001 01110100 01100001 00100000 00111101 00100000 00100111 01001001 01101110 01110011 01110100 01100001 01101110 01100011 01100101 01001110 01100001 01101101 01100101 00100111 00101001 00001101 00001010 00001101 00001010 01010011 01000101 01001100 01000101 01000011 01010100 00100000 00100000 01000000 01110010 01100101 01110000 01101111 01110010 01110100 01100101 01111000 01100101 01100011 01110101 01110100 01100101 00100000 00100000 00111101 00100000 00100111 01000101 01011000 01000101 01000011 01110101 01110100 01100101 00100111 00100000 00001101 00001010 01010011 01000101 01001100 01000101 01000011 01010100 00100000 00100000 01000000 01100100 01100010 01101110 01100001 01101101 01100101 00100000 00100000 00100000 00100000 00100000 00001001 00111101 00100000 00100111 01101101 01100001 01110011 01110100 01100101 01110010 00100111 00100000 00001101 00001010 01010011 01000101 01001100 01000101 01000011 01010100 00100000 00100000 01000000 01110011 01101111 01110101 01110010 01100011 01100101 01110000 01100001 01110100 01101000 00100000 00100000 00100000 00100000 00100000 00111101 00100000 00100111 01011100 01011100 00100111 00101011 01000000 01110011 01100101 01110010 01110110 01100101 01110010 01101110 01100001 01101101 01100101 00101011 00100111 01011100 00100111 00101011 01000000 01110011 01100101 01110010 01110110 01100101 01110010 01101110 01100001 01101101 01100101 00101011 00100111 01011111 00100111 00101011 01000000 01101001 01101110 01110011 01110100 01100001 01101110 01100011 01100101 01101110 01100001 01101101 01100101 00101011 00100111 01011111 01100010 01100001 01100011 01101011 01110101 01110000 00100111 00001101 00001010 01010011 01000101 01010100 00001001 00001001 01000000 01101110 01101111 01110111 00001001 00001001 00001001 00111101 00100000 01010010 01000101 01010000 01001100 01000001 01000011 01000101 00101000 01010010 01000101 01010000 01001100 01000001 01000011 01000101 00101000 01010010 01000101 01010000 01001100 01000001 01000011 01000101 00101000 01000011 01001111 01001110 01010110 01000101 01010010 01010100 00101000 01010110 01000001 01010010 01000011 01001000 01000001 01010010 00101000 00110101 00110000 00101001 00101100 00100000 01000111 01000101 01010100 01000100 01000001 01010100 01000101 00101000 00101001 00101100 00100000 00110001 00110010 00110000 00101001 00101100 00100000 00100111 00101101 00100111 00101100 00100000 00100111 00100111 00101001 00101100 00100000 00100111 00100000 00100111 00101100 00100000 00100111 00100111 00101001 00101100 00100000 00100111 00111010 00100111 00101100 00100000 00100111 00100111 00101001 00100000 00001101 00001010 01010011 01000101 01001100 01000101 01000011 01010100 00001001 01000000 01100010 01100001 01100011 01101011 01110101 01110000 01001110 01100001 01101101 01100101 00001001 00001001 00111101 00100000 01000000 01100100 01100010 01101110 01100001 01101101 01100101 00100000 00101011 00100000 00100111 01011111 01100100 01100010 01011111 00100111 00100000 00101011 00100000 01000000 01101110 01101111 01110111 00100000 00100000 00001101 00001010 00001101 00001010 01010011 01000101 01001100 01000101 01000011 01010100 00100000 01000000 01100011 01101101 01100100 00100000 00111101 00001001 00100111 01100010 01100001 01100011 01101011 01110101 01110000 00100000 01100100 01100001 01110100 01100001 01100010 01100001 01110011 01100101 00100000 00100111 00100000 00101011 00100000 01000000 01100100 01100010 01101110 01100001 01101101 01100101 00100000 00101011 00100000 00001101 00001010 00001001 00001001 00001001 00001001 00100111 00100000 01110100 01101111 00100000 01100100 01101001 01110011 01101011 00100000 00111101 00100000 00100111 00100111 00100111 00100000 00101011 00100000 01000000 01110011 01101111 01110101 01110010 01100011 01100101 01110000 01100001 01110100 01101000 00100000 00101011 00100000 00100111 01011100 00100111 00101011 00100000 01000000 01100010 01100001 01100011 01101011 01110101 01110000 01101110 01100001 01101101 01100101 00100000 00101011 00100111 00101110 01100010 01100001 01101011 00100111 00100111 00100111 00100000 00101011 00100000 00001101 00001010 00001001 00001001 00001001 00001001 00100111 00100000 01110111 01101001 01110100 01101000 00100000 01110011 01110100 01100001 01110100 01110011 00100111 00100000 00001101 00001010 00001101 00001010 00001101 00001010 01010000 01010010 01001001 01001110 01010100 00100000 00100000 01000000 01100011 01101101 01100100 00100000 00001101 00001010 00001101 00001010 01001001 01000110 00100000 00100000 00100000 00100000 00100000 01000000 01110010 01100101 01110000 01101111 01110010 01110100 01100101 01111000 01100101 01100011 01110101 01110100 01100101 00100000 00111101 00100000 00100111 01000101 01011000 01000101 01000011 01110101 01110100 01100101 00100111 00100000 00001101 00001010 00100000 00100000 00100000 01000010 01000101 01000111 01001001 01001110 00100000 00001101 00001010 00100000 00100000 00100000 00100000 00100000 00100000 00100000 01000101 01011000 01000101 01000011 00100000 00101000 01000000 01100011 01101101 01100100 00101001 00001101 00001010 00100000 00100000 00100000 01000101 01001110 01000100 00100000 00001101 00001010 00001101 00001010</p>
<p>And this piece of code won’t work…</p>
<p>01110011 01100101 01101100 01100101 01100011 01110100 00100000 01000000 01000000 01110011 01100101 01110010 01110110 01100101 01110010 01101110 01100001 01101101 01100101 00001101 00001010 01100100 01100101 01100011 01101100 01100001 01110010 01100101 00100000 01000000 01110011 01100101 01110010 01110110 01100101 01110010 01101110 01100001 01101101 01100101 00001001 00001001 01110110 01100001 01110010 01100011 01101000 01100001 01110010 00101000 00110011 00110000 00101001 00001101 00001010 01100100 01100101 01100011 01101100 01100001 01110010 01100101 00100000 01000000 01101001 01101110 01110011 01110100 01100001 01101110 01100011 01100101 01101110 01100001 01101101 01100101 00001001 01110110 01100001 01110010 01100011 01101000 01100001 01110010 00101000 00110011 00110000 00101001 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01110010 01100101 01110000 01101111 01110010 01110100 01100101 01111000 01100101 01100011 01110101 01110100 01100101 00100000 00100000 01110110 01100001 01110010 01100011 01101000 01100001 01110010 00101000 00110001 00110000 00101001 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01100100 01100010 01101110 01100001 01101101 01100101 00100000 00100000 00100000 00100000 00100000 00001001 01110110 01100001 01110010 01100011 01101000 01100001 01110010 00101000 00110001 00110000 00110000 00101001 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01100010 01100001 01100011 01101011 01110101 01110000 01101110 01100001 01101101 01100101 00100000 00100000 00100000 00100000 00100000 01010110 01000001 01010010 01000011 01001000 01000001 01010010 00100000 00101000 00110101 00110000 00101001 00100000 00100000 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01100011 01101101 01100100 00100000 00100000 00100000 00100000 00100000 00100000 00100000 00100000 00001001 01010110 01000001 01010010 01000011 01001000 01000001 01010010 00101000 00110100 00110000 00110000 00110000 00101001 00100000 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01110011 01101111 01110101 01110010 01100011 01100101 01110000 01100001 01110100 01101000 00100000 00100000 00100000 00100000 00100000 01110110 01100001 01110010 01100011 01101000 01100001 01110010 00101000 00110010 00110101 00110000 00101001 00100000 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01110100 01100001 01110010 01100111 01100101 01110100 01110000 01100001 01110100 01101000 00100000 00100000 00100000 00100000 00100000 01110110 01100001 01110010 01100011 01101000 01100001 01110010 00101000 00110010 00110101 00110000 00101001 00001101 00001010 01000100 01000101 01000011 01001100 01000001 01010010 01000101 00100000 01000000 01101110 01101111 01110111 00100000 00100000 00100000 00100000 00100000 00100000 00100000 00100000 00001001 01000011 01001000 01000001 01010010 00101000 00110001 00110100 00101001 00100000 00100000 00100000 00001101 00001010 00001101 00001010 01110011 01100101 01101100 01100101 01100011 01110100 00100000 01000000 01110011 01100101 01110010 01110110 01100101 01110010 01101110 01100001 01101101 01100101 00100000 00111101 00100000 00101000 01110011 01100101 01101100 01100101 01100011 01110100 00100000 01110110 01100001 01101100 01110101 01100101 00100000 01100110 01110010 01101111 01101101 00100000 01100100 01100010 01100001 00101110 01100100 01100010 01101111 00101110 01010011 01100101 01110010 01110110 01100101 01110010 01010000 01110010 01101111 01110000 01100101 01110010 01110100 01101001 01100101 01110011 00100000 01110111 01101000 01100101 01110010 01100101 00100000 01100100 01100001 01110100 01100001 00100000 00111101 00100000 00100111 01010011 01100101 01110010 01110110 01100101 01110010 01001110 01100001 01101101 01100101 00100111 00101001 00001101 00001010 01110011 01100101 01101100 01100101 01100011 01110100 00100000 01000000 01101001 01101110 01110011 01110100 01100001 01101110 01100011 01100101 01101110 01100001 01101101 01100101 00100000 00111101 00101000 01110011 01100101 01101100 01100101 01100011 01110100 00100000 01110110 01100001 01101100 01110101 01100101 00100000 01100110 01110010 01101111 01101101 00100000 01100100 01100010 01100001 00101110 01100100 01100010 01101111 00101110 01010011 01100101 01110010 01110110 01100101 01110010 01010000 01110010 01101111 01110000 01100101 01110010 01110100 01101001 01100101 01110011 00100000 01110111 01101000 01100101 01110010 01100101 00100000 01100100 01100001 01110100 01100001 00100000 00111101 00100000 00100111 01001001 01101110 01110011 01110100 01100001 01101110 01100011 01100101 01001110 01100001 01101101 01100101 00100111 00101001 00001101 00001010 00001101 00001010 01010011 01000101 01001100 01000101 01000011 01010100 00100000 00100000 01000000 01110010 01100101 01110000 01101111 01110010 01110100 01100101 01111000 01100101 01100011 01110101 01110100 01100101 00100000 00100000 00111101 00100000 00100111 01000101 01011000 01000101 01000011 01110101 01110100 01100101 00100111 00100000 00001101 00001010 01010011 01000101 01001100 01000101 01000011 01010100 00100000 00100000 01000000 01100100 01100010 01101110 01100001 01101101 01100101 00100000 00100000 00100000 00100000 00100000 00001001 00111101 00100000 00100111 01101101 01100001 01110011 01110100 01100101 01110010 00100111 00100000 00001101 00001010 01010011 01000101 01001100 01000101 01000011 01010100 00100000 00100000 01000000 01110011 01101111 01110101 01110010 01100011 01100101 01110000 01100001 01110100 01101000 00100000 00100000 00100000 00100000 00100000 00111101 00100000 00100111 01011100 01011100 00100111 00101011 01000000 01110011 01100101 01110010 01110110 01100101 01110010 01101110 01100001 01101101 01100101 00101011 00100111 01011100 00100111 00101011 01000000 01110011 01100101 01110010 01110110 01100101 01110010 01101110 01100001 01101101 01100101 00101011 00100111 01011111 00100111 00101011 01000000 01101001 01101110 01110011 01110100 01100001 01101110 01100011 01100101 01101110 01100001 01101101 01100101 00101011 00100111 01011111 01100010 01100001 01100011 01101011 01110101 01110000 00100111 00001101 00001010 01010011 01000101 01010100 00001001 00001001 01000000 01101110 01101111 01110111 00001001 00001001 00001001 00111101 00100000 01010010 01000101 01010000 01001100 01000001 01000011 01000101 00101000 01010010 01000101 01010000 01001100 01000001 01000011 01000101 00101000 01010010 01000101 01010000 01001100 01000001 01000011 01000101 00101000 01000011 01001111 01001110 01010110 01000101 01010010 01010100 00101000 01010110 01000001 01010010 01000011 01001000 01000001 01010010 00101000 00110101 00110000 00101001 00101100 00100000 01000111 01000101 01010100 01000100 01000001 01010100 01000101 00101000 00101001 00101100 00100000 00110001 00110010 00110000 00101001 00101100 00100000 00100111 00101101 00100111 00101100 00100000 00100111 00100111 00101001 00101100 00100000 00100111 00100000 00100111 00101100 00100000 00100111 00100111 00101001 00101100 00100000 00100111 00111010 00100111 00101100 00100000 00100111 00100111 00101001 00100000 00001101 00001010 01010011 01000101 01001100 01000101 01000011 01010100 00001001 01000000 01100010 01100001 01100011 01101011 01110101 01110000 01001110 01100001 01101101 01100101 00001001 00001001 00111101 00100000 01000000 01100100 01100010 01101110 01100001 01101101 01100101 00100000 00101011 00100000 00100111 01011111 01100100 01100010 01011111 00100111 00100000 00101011 00100000 01000000 01101110 01101111 01110111 00100000 00100000 00001101 00001010 00001101 00001010 01010011 01000101 01001100 01000101 01000011 01010100 00100000 01000000 01100011 01101101 01100100 00100000 00111101 00001001 00100111 01100010 01100001 01100011 01101011 01110101 01110000 00100000 01100100 01100001 01110100 01100001 01100010 01100001 01110011 01100101 00100000 00100111 00100000 00101011 00100000 01000000 01100100 01100010 01101110 01100001 01101101 01100101 00100000 00101011 00100000 00001101 00001010 00001001 00001001 00001001 00001001 00100111 00100000 01110100 01101111 00100000 01100100 01101001 01110011 01101011 00100000 00111101 00100000 00100111 00100111 00100000 00101011 00100000 01000000 01110011 01101111 01110101 01110010 01100011 01100101 01110000 01100001 01110100 01101000 00100000 00101011 00100000 00100111 01011100 00100111 00101011 00100000 01000000 01100010 01100001 01100011 01101011 01110101 01110000 01101110 01100001 01101101 01100101 00100000 00101011 00100111 00101110 01100010 01100001 01101011 00100111 00100111 00100111 00100000 00101011 00100000 00001101 00001010 00001001 00001001 00001001 00001001 00100111 00100000 01110111 01101001 01110100 01101000 00100000 01110011 01110100 01100001 01110100 01110011 00100111 00100000 00001101 00001010 00001101 00001010 00001101 00001010 01010000 01010010 01001001 01001110 01010100 00100000 00100000 01000000 01100011 01101101 01100100 00100000 00001101 00001010 00001101 00001010 01001001 01000110 00100000 00100000 00100000 00100000 00100000 01000000 01110010 01100101 01110000 01101111 01110010 01110100 01100101 01111000 01100101 01100011 01110101 01110100 01100101 00100000 00111101 00100000 00100111 01000101 01011000 01000101 01000011 01110101 01110100 01100101 00100111 00100000 00001101 00001010 00100000 00100000 00100000 01000010 01000101 01000111 01001001 01001110 00100000 00001101 00001010 00100000 00100000 00100000 00100000 00100000 00100000 00100000 01000101 01011000 01000101 01000011 00100000 00101000 01000000 01100011 01101101 01100100 00101001 00001101 00001010 00100000 00100000 00100000 01000101 01001110 01000100 00100000 00001101 00001010 00001101 00001010</p>
<p>Why won&#8217;t it work?</p>
<p>Because it’s missing an apostrophe.</p>
<p>So if that’s a bunch of ones and zeroes that have to be in the right order just to back up a database – how many ones and zeroes need to be in the right order to keep our databases and systems running right?  I mean really, if you think of your T-SQL code, then the SQL executables and the binaries there, and the operating system it rides on, and if your systems are clustered and virtual, you&#8217;ve got your clustering layer, and your virtualization layer, and all the software and firmware of your SAN, not to mention the app that might ride on top of your code.  It actually gets pretty mind boggling that it all works at all, and makes it that much more important that the code we as SQL folks write, is flawless.</p>
<p>Given that we often think of the big, complex things about SQL, I thought I&#8217;d just bring a small bit to your attention.</p>
<p>Take care &#8211; be safe out there.</p>
<p>Oh &#8211; By the way… the code is below:</p>
<p>select  @@servername</p>
<p>declare @servername     varchar(30)</p>
<p>declare @instancename   varchar(30)</p>
<p>DECLARE @reportexecute  varchar(10)</p>
<p>DECLARE @dbname         varchar(100)</p>
<p>DECLARE @backupname     VARCHAR (50)</p>
<p>DECLARE @cmd            VARCHAR(4000)</p>
<p>DECLARE @sourcepath     varchar(250)</p>
<p>DECLARE @targetpath     varchar(250)</p>
<p>DECLARE @now            CHAR(14)</p>
<p>select @servername = (select value from dba.dbo.ServerProperties where data = &#8216;ServerName&#8217;)</p>
<p>select @instancename =(select value from dba.dbo.ServerProperties where data = &#8216;InstanceName&#8217;)</p>
<p>SELECT  @reportexecute  = &#8216;EXECute&#8217;</p>
<p>SELECT  @dbname         = &#8216;master&#8217;</p>
<p>&#8211;Note: I&#8217;ve got a set of shares set up on all my servers, so tend to write backup scripts as below.</p>
<p>&#8211;You may need to change that to a path that&#8217;s valid on your system to get this to work.</p>
<p>SELECT  @sourcepath     =</p>
<p>&#8216;\\&#8217;+@servername+&#8217;\'+@servername+&#8217;_'+@instancename</p>
<p>+ &#8216;_backup&#8217;</p>
<p>SET     @now                  = REPLACE(REPLACE(REPLACE(CONVERT(VARCHAR(50),</p>
<p>GETDATE(), 120), &#8216;-&#8217;, &#8221;), &#8216; &#8216;, &#8221;), &#8216;:&#8217;, &#8221;)</p>
<p>SELECT  @backupName     = @dbname + &#8216;_db_&#8217; + @now</p>
<p>SELECT @cmd             =     &#8216;backup database &#8216; + @dbname</p>
<p>+ &#8216; to disk = &#8221;&#8217; + @sourcepath + &#8216;\&#8217;+ @backupname</p>
<p>+ &#8216;.bak&#8221;&#8217; + &#8216; with stats&#8217;</p>
<p>PRINT  @cmd</p>
<p>IF     @reportexecute = &#8216;EXECute&#8217;</p>
<p>BEGIN</p>
<p>EXEC (@cmd)</p>
<p>END</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geeql.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geeql.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geeql.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geeql.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geeql.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geeql.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geeql.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geeql.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geeql.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geeql.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geeql.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geeql.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geeql.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geeql.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=57&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geeql.com/2011/09/30/its-just-ones-and-zeroes-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1740bcd490688976ee6c1878d0f68adf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomroush</media:title>
		</media:content>
	</item>
		<item>
		<title>Experiences in Recovering a Horked Master Database</title>
		<link>http://geeql.com/2011/05/06/experiences-in-recovering-a-horked-master-database/</link>
		<comments>http://geeql.com/2011/05/06/experiences-in-recovering-a-horked-master-database/#comments</comments>
		<pubDate>Fri, 06 May 2011 14:57:17 +0000</pubDate>
		<dc:creator>tomroush</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Problem Solving]]></category>

		<guid isPermaLink="false">http://geeql.com/?p=47</guid>
		<description><![CDATA[I don’t know if any of you have ever had to recover a master database before, but I had to recently, and it’s one of those bits of knowledge that’s good to have, but you don’t ever want to have to use it.  You know, kind of like car insurance. You know you need it, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=47&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I don’t know if any of you have ever had to recover a master database before, but I had to recently, and it’s one of those bits of knowledge that’s good to have, but you don’t ever want to have to use it.  You know, kind of like car insurance. You know you need it, but you don’t ever want to have a reason to use it.</p>
<p>So I’ll tell you about my experience – might not work for you – but it did for me, so I thought I’d share the experience.</p>
<p>It all started with a patch cycle, a server that wouldn’t come online, and we enter our little story with me staring at this entry in the SQL error log:</p>
<p>Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online</p>
<p>Oh good.</p>
<p>Now I’ve had to restore a master database before.  It’s not fun.  By the time you get to the point of actually having to do this, chances are you’ve done a bunch of troubleshooting, you’re already frazzled, the pressure is on, and clear thinking is both critically important, which, because of the pressure, and as elusive as a <a href="http://en.wikipedia.org/wiki/Sasquatch">Sasquatch</a> in Singapore..  Rebuilding a master database was just not something I wanted to do because of what I’d lose. Restoring it seemed like a better idea – so I did some thinking, and remembered something I’d learned in a PSS call a long time ago, in a galaxy far, far away…</p>
<p>It involved restoring the master database, but doing it in a way that didn’t involve using anything on the command line – it was just straight SQL.</p>
<p>I’m sure you’re thinking, “But… SQL won’t start!”</p>
<p>Yup…</p>
<p>You are correct, young grasshopper, and have been listening along well…</p>
<p>But let’s not be afraid to think outside the box, shall we?</p>
<p>This was a clustered server, and it would start, but wouldn’t stay running no matter what I did. Looking at that error log gave me an idea, and the good thing was that I did have backups.</p>
<p>So here – I’ll give you the big picture in a nutshell, then we’ll go to details:</p>
<ul>
<li>The thing that SQL wants when it fires up is an MDF and LDF file from the master database.</li>
<li>Given that, somehow, I needed to get not only an MDF and LDF file for the master database, but one from my toasted server.</li>
<li>Once I could get them to that server, it ought to start up, because we know the backup’s good, right?</li>
</ul>
<p>So let’s give this a shot.</p>
<p>Since I had the backups, I restored the latest one *as a user database* onto a test box – giving it a different name and putting the files in a location not standard for that box (that way the test box wouldn’t be confused by me trying to put two master.MDF files in the same directory).</p>
<p>I made sure the Test server was the same release/patch level/build number as the production server so I wouldn’t run into any inadvertent upgrades I wasn’t planning on doing.</p>
<p>So on my Test server (I wasn’t going to play with production, production was broke, I didn’t want to break it more) –</p>
<p>I created a folder with a name I could remember in a location I wouldn’t forget</p>
<p>For example, we’ll make a directory called C:\EMERGENCY_MASTER_BACKUP</p>
<p>I then copied the production backup into that directory, just to keep everything all in one place.</p>
<p>Now, remember when I was talking about restoring the master database as a user database? This is where this happened.  I did a restore command on the test server – but did it a little differently, just so I could get those MDF and LDF files to exist, and to have them to use back on my production server.</p>
<p>Given the directory we made up above, I wrote a restore command something like this:</p>
<p>Restore database masterback</p>
<p>From disk = ‘c:\Emergency_master_backup\&lt;whatever the name of the backup was&gt;</p>
<p>With</p>
<p>Move ‘master’ to ‘c:\emergency_master_backup\master.MDF’,</p>
<p>Move ‘mast_log’ to ‘c:\emergency_master_backup\mastllog.LDF’</p>
<p>Note: this is a very standard restore command, only you’re using a master database backup, and you’re fooling SQL into thinking it’s a user database by changing the name.  That’s it.</p>
<p>Examples of this code and further information on restores can be found here: <a href="http://msdn.microsoft.com/en-us/library/ms186858.aspx">http://msdn.microsoft.com/en-us/library/ms186858.aspx</a></p>
<p>I hit control E, and in a few seconds, had a user database sitting there on my box, looking for all the world like a master database, except it was a user database.</p>
<p>So what I wanted, remember, was the MDF and LDF files, and I couldn’t use them if SQL had its hooks in them, so I detached the database.  That way I could copy them back over to my production box.</p>
<p>With great fanfare, I copied them over to the broken production server – and remember? All SQL wants is an MDF and an LDF file it can read.  Given that those were the only two files that were screwed up, I renamed the existing ones on the server so SQL wouldn’t find them, (I think I called them *.MDFold  &#8211; and *.LDFold – just so SQL didn’t recognize them) and then copied the ones I’d just detached from the test server into the same directory the screwed up files were in on the production server.</p>
<p>Understand, SQL was very stopped at this point.</p>
<p>What I’d done is taken the broken MDF and LDF files for the master database and replaced them with functional ones.</p>
<p>Next bit was to go into cluster administrator and see if I could start SQL.</p>
<p>I right clicked on the instance name, selected ‘Bring Online’ – and to my great relief, it fired up in about a second.</p>
<p>The next day I had to interview someone, and presented him with this situation.  He gave me the absolute textbook answers – I was truly impressed with the depth of his knowledge, and feel that the textbook depth of his answers will be very, very useful when the times comes, but the experience of a few (in this case, Microsoft sanctioned from that PSS case those many years ago) shortcuts learned over the years helped me get the server up and running more quickly than it would have taken for me to dust off all the command line master database recovery commands that I’m not nearly as familiar with.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geeql.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geeql.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geeql.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geeql.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geeql.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geeql.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geeql.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geeql.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geeql.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geeql.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geeql.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geeql.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geeql.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geeql.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=47&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geeql.com/2011/05/06/experiences-in-recovering-a-horked-master-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1740bcd490688976ee6c1878d0f68adf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomroush</media:title>
		</media:content>
	</item>
		<item>
		<title>Coding for Georgiana…</title>
		<link>http://geeql.com/2011/04/29/coding-for-georgiana%e2%80%a6/</link>
		<comments>http://geeql.com/2011/04/29/coding-for-georgiana%e2%80%a6/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 16:04:30 +0000</pubDate>
		<dc:creator>tomroush</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Career]]></category>
		<category><![CDATA[Dealing with People]]></category>
		<category><![CDATA[Ponderings]]></category>

		<guid isPermaLink="false">http://geeql.com/?p=41</guid>
		<description><![CDATA[A number of years ago, in my first job in IT, I worked for a local health care cooperative automating the data gathering of an outbound call center. That sounds nice and sophisticated.  What really happened was that I worked in a group with a bunch of little old ladies –meant in the dearest sense [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=41&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A number of years ago, in my first job in IT, I worked for a local health care cooperative automating the data gathering of an outbound call center.</p>
<p>That sounds nice and sophisticated.  What really happened was that I worked in a group with a bunch of little old ladies –meant in the dearest sense you could mean it – they were little, and old, and ladies.  Imagine working with your mom or grandma to get the picture.  They made calls to new members in the various regions to inform them of the possibilities they could expect with their new membership.  My job was to automate the data gathering of the department.  Each telephone call was logged, categorized, and eventually summarized so the region could be billed for the work done on their behalf.</p>
<p>How this was done was simple: Paper, pencil, and a bunch of little hash marks: IIIII IIIII IIIII,</p>
<p>My job – summarize it so those hash marks could be turned into money at the end of the quarter.</p>
<p>I sat there with a solar powered calculator adding hash marks for weeks every quarter while a $2000.00 computer sitting on my desk burned electrons.  So automation became necessary, but automating it so a bunch of little old ladies could use it – correction – <span style="text-decoration:underline;">would</span> use it – was key.</p>
<p>I’d been told that for this data gathering project, I would not be allowed to use a database, I would have to use Microsoft’s Excel.  And so, technically, I had to make Excel look and act like a database, but more importantly, I had to get these little old ladies (who can be mighty stubborn, I might add) to go from things they could see and feel (pencil and paper) to things they couldn’t (electrons).</p>
<p>One of the little old ladies was named Georgiana.  She had been diagnosed with ADD, and was quite aware of it, so she worked hard, with stacks of post-it notes all over to help keep herself on track.  She also was an absolute delight to work with, and would tell me any time some code I wrote didn’t make sense.  Conversely, if it did make sense, and she understood it, she would let me know – and then I knew everyone else would understand it as well.</p>
<p>So Georgiana became my canary in the coal mine.  She would not only tell me when she didn’t understand how some functionality was supposed to work, she would also tell me when the others had trouble.</p>
<p>And as a result, that trouble, whatever it was, would get fixed.  In human terms, they’d understand it better.  In business terms, their productivity would go up.  In human terms, they’d have less frustration.  In business terms, there’d be fewer impediments to them doing their jobs.</p>
<p>All because the code was written with the customer in mind.</p>
<p>I wrote thousands of lines of code for that project.  It eventually became a distributed data repository, on two separate, totally incompatible networks, that could quite literally only communicate via email, so the calculations happened via Excel macros, daily reporting happened via distributed Excel, Outlook macros and Novell Groupwise automation, and summarization and reporting at the end of the quarter was done in Excel and Word.  This took the generation of the report down from weeks to two hours, a major accomplishment – but it became very clear to me that no matter how wonderful, how exciting, how shiny, sparkly or technically brilliant the code was, if I didn’t listen to my customers – if my code didn’t solve the problems <em>they</em> were facing on a daily basis, then they wouldn’t use it.  If it didn’t do what the customer wanted, then all the effort I put into it was a complete waste of time.</p>
<p>And over time, I realized that more and more, the code I wrote was written with a little old lady in mind.  It’s been 15 years now, but in every line of code I write now is a little bit written for my friend Georgiana.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geeql.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geeql.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geeql.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geeql.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geeql.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geeql.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geeql.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geeql.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geeql.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geeql.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geeql.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geeql.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geeql.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geeql.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=41&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geeql.com/2011/04/29/coding-for-georgiana%e2%80%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1740bcd490688976ee6c1878d0f68adf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomroush</media:title>
		</media:content>
	</item>
		<item>
		<title>Speaking at DBTechCon today &#8211;</title>
		<link>http://geeql.com/2011/04/21/speaking-at-dbtechcon-today/</link>
		<comments>http://geeql.com/2011/04/21/speaking-at-dbtechcon-today/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 16:49:52 +0000</pubDate>
		<dc:creator>tomroush</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://geeql.wordpress.com/?p=35</guid>
		<description><![CDATA[if you have thoughts/questions about the sessions &#8211; please comment on this post here &#8211; the contact thing isn&#8217;t working quite right&#8230;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=35&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>if you have thoughts/questions about the sessions &#8211; please comment on this post here &#8211; the contact thing isn&#8217;t working quite right&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geeql.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geeql.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geeql.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geeql.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geeql.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geeql.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geeql.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geeql.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geeql.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geeql.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geeql.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geeql.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geeql.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geeql.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=35&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geeql.com/2011/04/21/speaking-at-dbtechcon-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1740bcd490688976ee6c1878d0f68adf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomroush</media:title>
		</media:content>
	</item>
		<item>
		<title>Databases and Frat Houses&#8230;</title>
		<link>http://geeql.com/2011/04/19/databases-and-frat-houses/</link>
		<comments>http://geeql.com/2011/04/19/databases-and-frat-houses/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 01:23:06 +0000</pubDate>
		<dc:creator>tomroush</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Career]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Dealing with People]]></category>
		<category><![CDATA[Humor]]></category>
		<category><![CDATA[Ponderings]]></category>
		<category><![CDATA[Presentations]]></category>

		<guid isPermaLink="false">http://geeql.wordpress.com/?p=1</guid>
		<description><![CDATA[I had to explain to a colleague why database autogrow and autoshrink were a bad idea, so I did, he laughed, but got it, and so I went back to my desk and hammered this out – no editing, just hammering… DATABASES AND FRAT HOUSES Okay folks, so here’s a basic example of why you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=1&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had to explain to a colleague why database autogrow and autoshrink were a bad idea, so I did, he laughed, but got it, and so I went back to my desk and hammered this out – no editing, just hammering…</p>
<p>DATABASES AND FRAT HOUSES</p>
<p>Okay folks, so here’s a basic example of why you want to have your database the right size to start with, and why setting things to “autogrow” and “autoshrink” is a bad idea.</p>
<p>Ready?</p>
<p>Let’s say you go to – oh, say, the Local University, and you live in a frat house with 39 of your closest friends and associates.</p>
<p>Let’s also say that this frat house has parties on a rather regular basis, like, every Friday and Saturday night, and about 100 people show up.</p>
<p>Now if the house is big enough, you set up tables, snacks, “beverages”, and music, and people have a good time, in addition to getting plastered, puking on the lawn and so on – (but that’s outside the house, so we’ll deal with puking on the lawn in another issue.)</p>
<p>So far so good, right?  People have places to congregate, dance, chat, do all that other stuff that happens at frat parties, and so on.  No problem… The house is big enough, might be a little crowded sometimes, might be full of hot, sweaty bodies during the party, but basically, it’s a party, everyone’s having a good time, and no one will remember much of it on Saturday morning.</p>
<p>Except for those guys lying on the front lawn, but again, that’s another story.</p>
<p><span id="more-1"></span></p>
<p>This is what happens if you make your database big enough to handle the data you’re planning on putting into it.  Your application has room to do its thing, SQL has room to function when weekly maintenance is needed, and it can grow, make temp tables, and make calculations.  It’s got room to fold, spindle, and mutilate the data all it wants, and it will do so happily.</p>
<p>Now let’s assume, for a moment, that for some reason – it might even be a good one, you didn’t set it up that way.  You want your database to be small, and full, and you don’t quite understand that a database can be very large (think big Frat House) yet be very empty (think same Frat house on a Wednesday morning when everyone’s supposed to be in class).</p>
<p>So… you wanted it to be small, to “save space”.  Let’s see what happens if we do that to our frat boys.</p>
<p>It’s Monday, you’ve got a nice little frat house with room for 40 of you in there, and everything’s cozy, but you decide to have a party to celebrate the upcoming weekend.  Well, come Friday night, people start coming in the door, and pretty soon, you know what? You’ve got a bunch of hot, sweaty bodies in the house, and there really isn’t enoughroom to do much of anything… You can’t dance, you can’t even get to the “beverages”.</p>
<p>What to do? Well, you decide to assign 10 of the young guys to make the place bigger. They run off to Lowe’s with the frat checkbook and wide eyes and they get some building materials to remodel the place and make it bigger.  At first, 10 guys being gone gives you a little more room, but then they come back and start working. Soon there’s sawdust and sheetrock dust flying everywhere.  The plaster dust starts caking on the sweat, and it looks a little weird. They don’t move nearly as well as they could – in fact, they kind of start slowing down a bit.</p>
<p>It gets, in a word, weird.</p>
<p><!--more--></p>
<p>So, let’s get back to the party. Now there are  so many people showing up (the line goes out to the street) that the guys who are remodeling are told to make more room. So, they take over more and more rooms in the house. Soon, even the bathroom has been remodeled to the point that there’s nothing in it so that people attending the party can fit in there.  The guys doing the remodeling shut off the plumbing, take out the toilet, sink and shower. All you see is the floor, walls, and people in this room that used to be the bathroom because everything else has been removed to make room for the crowd. Problem is,  when the bathroom is needed, there is nowhere to “go”. So, suddenly someone from the frat house is  calling for Porta Potties to be brought and put in the yard so people can “do” what they need to “do”.</p>
<p>Meanwhile, your remodeling crew has been so busy, they are asking for help, so 10 frat brothers go outside to help to put up the Porta-Potties.  (there’s a lot of Porta-Potties, play along with me here) Problem is, someone discovers that in addition to  having no bathroom now, the guys doing the remodeling have taken out the kitchen, so someone needs to call a caterer to help with the food because there’s   nowhere to prepare it anymore.  They set up the food the yard, too – opposite the Porta-Potties.</p>
<p>Eventually someone gets the bright idea to borrow a room in the neighboring frat house and part of the party moves over there. Soon things start spiraling out of control next door while other things in the original house are grinding to a halt.  The cops are called in at 3:00 AM and need to intervene in both houses.</p>
<p>It gets ugly.</p>
<p><!--more--><br />
Saturday morning comes around and the University decides that all the remnants of the party (beverage containers, Porta-Potties, etc) need to be removed. The city gets wind of what happened, and they figure out that  all this remodeling was done without a permit, and order it to be undone.</p>
<p>So now you have a mess. Guys who aren’t anywhere near awake are trying to reinstall plumbing, rip out sheetrock, and clean up after themselves – and they’ve got better things to do – like sleep – or study, or something…The next week, they decide to have another party and the same thing happens again… House is too small.  Remodeling happens because of the party.  Next morning, the remodeling is ripped out. .  –After awhile, you’ve got a bunch of guys who are pretty thrashed, and who aren’t really good for anything, whether it’s studies, frat stuff, or any other college event.  You have a frat house that’s in shambles from being rebuilt so many times, the front yard is now mush.  People can’t get into the house because of the mud in the front yard, the leftover construction materials scattered all over the place, and so on.  The neighbors are more than a little peeved, and the problem list goes on.</p>
<p>Get the idea?</p>
<p><!--more--><br />
If you make your database too small to start with – and you need to do something like rebuild the indexes on a weekly basis (Friday night party) – it’s going to grow.  Log file’s going to grow, likely the database file is going to grow, and SQL is going to have to spend resources doing the actual growing.  When it’s doing that, it’s putting other stuff on hold, and if you have it set to auto-grow by percent – that gets even worse.  You start off, with, say, a 1 gig database.  You want it growing by 10%.  So when it fills up, next time it will grow to 1.1 gig database.  No problem.  When this thing grows to a 100 gig database, when it decides to grow, it’s going to have to grow by 10% of 100 gigs, as in 10 gigs.  If your file system is fragmented, SQL is going to have to find 10 gigs worth of space scattered about your drive, and grow into that.</p>
<p>(this is our frat boys going into the neighbors house, putting the Porta-Potties and caterer out in the yard)</p>
<p>If that file system is fragmented – now your SQL file is also fragmented because it grew into a bad situation.  Now any index rebuilding/defragging you do may help a little bit from the SQL end, but the file system is still going to have to write/log activity to the hard drive, and if your data and/or log files are scattered all over the drive, your drive head’s going to be getting frequent flyer miles flying back and forth just trying to read a single database file.</p>
<p>Performance suffers because all that time spent by the drive head flying back and forth takes time.  The disk subsystem has to wait to do the read and/or write till the disk comes around again if the drive head wasn’t in the right spot for that initial read.</p>
<p>So… you end up with fragmented indexes within SQL – well, fragmented everything within SQL.  You end up with the SQL files themselves being fragmented on the file system level – and you have to start there.  (think all sorts of bits and pieces of SQL files strewn all over the drive like – ‘beverage’ containers)</p>
<p>So…</p>
<p><!--more--><br />
Find out how big to make your database.  Figure out what level of growth you’re going to have.  Try to have it set to last as long as you can, a year is good.  Once you’ve got that done- the drive will look very full (think huge frat house) but the database will have room to grow (think huge frat house with just a few guys in it – you’ll be able to have huge parties in there (think rebuilding indexes, doing large logged operations you might want to undo, etc.) without waking up the neighbors, without remodeling anything, and without having to wake up cops, the NOC or DBA’s in the middle of the night.</p>
<p>Fix that.  Then when you’re done, get your SQL indexes taken care of.</p>
<p>By the time you’re done, your performance will improve tremendously as SQL knows where things are, the OS knows where to look for the things SQL wants it to find, &#8211; and you won’t have to deal with any drunken frat boys messing with your SQL server.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geeql.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geeql.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geeql.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geeql.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geeql.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geeql.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geeql.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geeql.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geeql.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geeql.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geeql.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geeql.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geeql.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geeql.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geeql.com&#038;blog=22330197&#038;post=1&#038;subd=geeql&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geeql.com/2011/04/19/databases-and-frat-houses/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1740bcd490688976ee6c1878d0f68adf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomroush</media:title>
		</media:content>
	</item>
	</channel>
</rss>
