<?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>JaniceCLee</title>
	<atom:link href="http://janiceclee.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://janiceclee.wordpress.com</link>
	<description></description>
	<lastBuildDate>Sun, 05 May 2013 22:33:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='janiceclee.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/ae075df87e723c499d3a5e6c3945c7e9?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>JaniceCLee</title>
		<link>http://janiceclee.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://janiceclee.wordpress.com/osd.xml" title="JaniceCLee" />
	<atom:link rel='hub' href='http://janiceclee.wordpress.com/?pushpress=hub'/>
		<item>
		<title>SQL Server 2008 R2 Hangs on VMWare Server environment</title>
		<link>http://janiceclee.wordpress.com/2011/04/06/sql-hangs-on-vmware/</link>
		<comments>http://janiceclee.wordpress.com/2011/04/06/sql-hangs-on-vmware/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 13:14:14 +0000</pubDate>
		<dc:creator>janiceclee</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[vmware sql 2008 ssms hangs]]></category>

		<guid isPermaLink="false">http://janiceclee.com/?p=882</guid>
		<description><![CDATA[SQL Server 2008 R2 Hangs on VMWare Server environment: Well, that&#8217;s what you see anyway. Problem: I set up an SQL Server 2008 R2 test environment on a virtual machine using the free VMWare Server 2.0. My guest OS was Windows Server 2008 R2. I also installed VMWare Tools on the guest OS. I could start SQL Server...<br /><a class="more-link" href="http://janiceclee.wordpress.com/2011/04/06/sql-hangs-on-vmware/">Continue reading &#187;</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=882&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>SQL Server 2008 R2 Hangs on VMWare Server environment</strong>: <em>Well, that&#8217;s what you see anyway.</em></p>
<p><strong>Problem</strong>: I set up an SQL Server 2008 R2 test environment on a virtual machine using the free <a href="http://www.vmware.com/products/server/overview.html" target="_blank">VMWare Server 2.0</a>. My guest OS was <a href="http://technet.microsoft.com/en-us/evalcenter/dd459137.aspx" target="_blank">Windows Server 2008 R2</a>. I also installed VMWare Tools on the guest OS.</p>
<p>I could start SQL Server Management Studio (SSMS) without problems. However, as soon as I attempted to connect to the SQL Server, the whole VM stopped responding.</p>
<p><a href="http://sqlmyway.files.wordpress.com/2011/04/hangs.jpg"><img class="alignnone size-full wp-image-883" title="SSMS stops responding" src="http://sqlmyway.files.wordpress.com/2011/04/hangs.jpg?w=560" alt=""   /></a></p>
<p>I couldn&#8217;t kill the VM without restarting the physical host. I had set up multiple VMs smoothly in the past but I still wondered, was the problem ME? Did I miss to do something during installation?</p>
<p><strong>Solution</strong>: Okay, I didn&#8217;t want to have to admit this&#8211;but I did try to re-install everything. I thought maybe I did a &#8220;next-next&#8221; and missed to specify some options (that is, clicked through the installation wizard without reading. Nopes, that&#8217;s not in the dictionary but like OMG, it may be soon). Good news was, it wasn&#8217;t me since I still couldn&#8217;t connect to SSMS. I checked the Guest OS&#8217;s event viewer. Nothing there.</p>
<p>What finally clued me in was this: <a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1011709" target="_blank">Troubleshooting SVGA drivers installed with VMware Tools on Windows 7 and Windows 2008 R2 running on ESX 4.0</a>. It took <strong>awhile</strong> for me to find this because if you read the KB, you&#8217;d notice that it&#8217;s not really describing the problem that I was having (it says there &#8220;black screen&#8221; and &#8220;slow mouse performance&#8221;). The products affected don&#8217;t even include VMWare Server. And lastly, from my perspective, SSMS was the problem&#8211;not Windows Server 2008 R2.</p>
<p>Regardless, the problem was the SVGA driver that came with VMWare Tools (<em><strong>weeweeweee!</strong></em>). So I ran the VMWare Tools installer again and removed the SVGA driver.</p>
<p><a href="http://sqlmyway.files.wordpress.com/2011/04/remove_svga.jpg"><img class="alignnone size-full wp-image-885" title="Removing SVGA" src="http://sqlmyway.files.wordpress.com/2011/04/remove_svga.jpg?w=560" alt=""   /></a></p>
<p>And finally, the problem was fixed.</p>
<p><a href="http://sqlmyway.files.wordpress.com/2011/04/success.jpg"><img class="alignnone size-full wp-image-886" title="Successful connection" src="http://sqlmyway.files.wordpress.com/2011/04/success.jpg?w=560" alt=""   /></a></p>
<p>If you are encountering the same issue, I&#8217;m hoping you find yourself squealing <em><strong>weeweewee</strong></em> sooner than I did.</p>
<h2><em>Is this causing you sleepless nights too?</em></h2>
<p>This is only somewhat related to the main topic of this post&#8230;but doesn&#8217;t this installer design bother you too?</p>
<p><a href="http://sqlmyway.files.wordpress.com/2011/04/installer_01.jpg"><img class="alignnone size-full wp-image-890" title="installer_01" src="http://sqlmyway.files.wordpress.com/2011/04/installer_01.jpg?w=560" alt=""   /></a></p>
<p>I see this in a lot of installers. When you check the feature for installation, it changes to this:</p>
<p><a href="http://sqlmyway.files.wordpress.com/2011/04/installer_02.jpg"><img class="alignnone size-full wp-image-891" title="installer_02" src="http://sqlmyway.files.wordpress.com/2011/04/installer_02.jpg?w=560" alt=""   /></a></p>
<p>Shouldn&#8217;t the space requirement be shown BEFORE I even check the feature? #JustSaying</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janiceclee.wordpress.com/882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janiceclee.wordpress.com/882/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=882&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janiceclee.wordpress.com/2011/04/06/sql-hangs-on-vmware/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc9b3018ce55a4ae5ecb44d41f13a9ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Janice</media:title>
		</media:content>

		<media:content url="http://sqlmyway.files.wordpress.com/2011/04/hangs.jpg" medium="image">
			<media:title type="html">SSMS stops responding</media:title>
		</media:content>

		<media:content url="http://sqlmyway.files.wordpress.com/2011/04/remove_svga.jpg" medium="image">
			<media:title type="html">Removing SVGA</media:title>
		</media:content>

		<media:content url="http://sqlmyway.files.wordpress.com/2011/04/success.jpg" medium="image">
			<media:title type="html">Successful connection</media:title>
		</media:content>

		<media:content url="http://sqlmyway.files.wordpress.com/2011/04/installer_01.jpg" medium="image">
			<media:title type="html">installer_01</media:title>
		</media:content>

		<media:content url="http://sqlmyway.files.wordpress.com/2011/04/installer_02.jpg" medium="image">
			<media:title type="html">installer_02</media:title>
		</media:content>
	</item>
		<item>
		<title>Just another MEME Monday&#8230;</title>
		<link>http://janiceclee.wordpress.com/2011/04/04/just-another-meme-monday/</link>
		<comments>http://janiceclee.wordpress.com/2011/04/04/just-another-meme-monday/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 16:06:50 +0000</pubDate>
		<dc:creator>janiceclee</dc:creator>
				<category><![CDATA[SQL-ish]]></category>
		<category><![CDATA[Meme monday]]></category>

		<guid isPermaLink="false">http://janiceclee.com/?p=874</guid>
		<description><![CDATA[&#8220;Google if you don’t know. Get yourself googled if you do.&#8221; This is my contribution to Tom LaRock&#8217;s (blog &#124; twitter) Meme Monday (Write a SQL blog post that tells a story in 11 words or  less). I was tagged by one of my favorite girls, Erin Stellato (blog &#124; twitter). So I&#8217;m tagging my...<br /><a class="more-link" href="http://janiceclee.wordpress.com/2011/04/04/just-another-meme-monday/">Continue reading &#187;</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=874&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h2><strong><em>&#8220;Google if you don’t know. Get yourself googled if you do.&#8221;</em></strong></h2>
<p>This is my contribution to Tom LaRock&#8217;s (<a href="http://thomaslarock.com/" target="_blank">blog </a>| <a href="http://twitter.com/sqlrockstar" target="_blank">twitter</a>) <a href="http://thomaslarock.com/2011/03/meme-monday/" target="_blank">Meme Monday</a> (<em>Write a SQL blog post that tells a story in 11 words or  less)</em>.</p>
<p>I was tagged by one of my favorite girls, Erin Stellato (<a href="http://www.erinstellato.com" target="_blank">blog </a>| <a href="http://twitter.com/erinstellato" target="_blank">twitter</a>). So I&#8217;m tagging my favorites as well: Donabel Santos (<a href="http://www.sqlmusings.com/" target="_blank">blog</a> | <a href="http://twitter.com/sqlbelle" target="_blank">twitter</a>), David Taylor (<a href="http://dyfhid.wordpress.com/" target="_blank">blog </a>| <a href="http://twitter.com/dyfhid" target="_blank">twitter</a>), and Karla Landrum (<a href="http://www.karlalandrum.wordpress.com/" target="_blank">blog </a>| <a href="http://twitter.com/KarlaKay22" target="_blank">twitter</a>).</p>
<p>Yes, baby! I&#8217;m back.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janiceclee.wordpress.com/874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janiceclee.wordpress.com/874/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=874&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janiceclee.wordpress.com/2011/04/04/just-another-meme-monday/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc9b3018ce55a4ae5ecb44d41f13a9ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Janice</media:title>
		</media:content>
	</item>
		<item>
		<title>Playing the MCM Readiness Videos (on the iPod and Droid)</title>
		<link>http://janiceclee.wordpress.com/2010/11/23/playing-the-mcm-readiness-videos-on-the-ipod-and-droid/</link>
		<comments>http://janiceclee.wordpress.com/2010/11/23/playing-the-mcm-readiness-videos-on-the-ipod-and-droid/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 19:50:14 +0000</pubDate>
		<dc:creator>janiceclee</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[cannot watch mp4 on ipod]]></category>
		<category><![CDATA[download files simulatenously]]></category>
		<category><![CDATA[download utility]]></category>

		<guid isPermaLink="false">http://janiceclee.com/?p=834</guid>
		<description><![CDATA[Ahhh..Thanksgiving. So many things to be thankful for. There&#8217;s the traffic-filled 4-hour trip to the in-laws. There&#8217;s the Thanksgiving *day* (nopes, it&#8217;s just not dinner) of just hanging out with the in-laws. There&#8217;s also the Thanksgiving chit-chat with the in-laws of the in-laws. And of course&#8211;how can I not look forward to and be thankful...<br /><a class="more-link" href="http://janiceclee.wordpress.com/2010/11/23/playing-the-mcm-readiness-videos-on-the-ipod-and-droid/">Continue reading &#187;</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=916&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Ahhh..Thanksgiving. So many things to be thankful for. There&#8217;s the traffic-filled 4-hour trip to the in-laws. There&#8217;s the Thanksgiving *day* (nopes, it&#8217;s just not dinner) of <em>just </em>hanging out with the in-laws. There&#8217;s also the Thanksgiving chit-chat with the in-laws of the in-laws. And of course&#8211;how can I not look forward to and be thankful for the Thanksgiving &#8220;how&#8217;s-the-baby-project-going&#8221; interview  where, without a baby in my arms, proving that we&#8217;re really working hard on having one is more challenging than restoring a corrupt db (<em>yes, mom, we&#8217;re already trying so many things&#8211;we&#8217;re even trying out scrum. So what&#8217;s wrong then? Don&#8217;t look at me! Ask your son. He&#8217;s not, uhm, agile enough. </em>).</p>
<p>So to make Thanksgiving this year better than the last (and the ones before that), I downloaded all the <a href="http://technet.microsoft.com/en-us/sqlserver/ff977043.aspx" target="_blank">SQL Server 2008 Microsoft Certified Master (MCM) Readiness Videos</a> that have been posted so far. My (not-so-evil) plan is to grab my iPod or my Droid when things become too err&#8230;enjoyable. So while they&#8217;re talking about babymaking and all the &#8220;challenges&#8221; involved in it (and how it can actually be really just sooo easy&#8211;&#8221;as long as Janice, you don&#8217;t stress too much.&#8221;)&#8211;I&#8217;ll just DROID them out and listen to Paul Randal tell me that I&#8217;m <em>&#8220;spatial&#8221;</em>! Ha!</p>
<p><strong>1) Which format do I download?</strong><br />
If you&#8217;ve visited the site, you&#8217;ll notice that there are different formats available. I wanted to watch the videos using my phone (a Droid 2) or my iPod nano (4th gen, I think) so the links that I was interested in were the following:</p>
<p><a href="http://janiceclee.files.wordpress.com/2010/11/formats.jpg"><img class="alignnone size-full wp-image-837" title="formats" src="http://janiceclee.files.wordpress.com/2010/11/formats.jpg?w=560" alt=""   /></a></p>
<p>Only two of the files I downloaded via the iPod link worked. So I tried downloading the MP4. Most of the MP4 files however would only play on my PC and not on my iPod or Droid. You may experience the same thing so here are some tips&#8230;</p>
<p><strong>Tip 1: </strong>Use HandBrake to convert the MP4 (or the other video formats) to an MP4 format that your iPod can actually play. You can download the tool here for free: <a href="http://handbrake.fr/downloads.php">http://handbrake.fr/downloads.php</a>. With the iTunes application (I&#8217;m using version 10), you can do the <a href="http://support.apple.com/kb/ht1211" target="_blank">same thing</a> but it takes sooo long and you can only do one at a time! Thanksgiving would be over before you finish. If you use HandBrake, the process is not only faster, you can also put all the files that you want to convert on a queue  and you can just leave it until it&#8217;s done.</p>
<p><strong>Tip 2:</strong> Now&#8211;this really depends on what your in-law tolerance is. The longer you can stand them, the less videos you have to download. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I for one have a very high in-law tolerance. So&#8211;to download <strong>all</strong>&#8211;use the free Download Manager from SourceForge. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Here&#8217;s the <a href="http://sourceforge.net/projects/freedownload/" target="_blank">link</a>. Just copy the target link of each video and add it to the queue. Leave it running overnight and you&#8217;re all done the next day.</p>
<p><strong>Tip 3:</strong> When you&#8217;re done downloading and converting the videos, just add them to your iTunes library and voila&#8212;THANKSGIVING.</p>
<p>To play the files on your Droid, just copy the converted MP4 files to your SD card and VOILA&#8211;yep-yep&#8211;it&#8217;s Thanksgiving again! Ahh..what do they call these things again? Oh yeah&#8230;the gifts that just keep giving. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Happy Thanksgiving everyone!</p>
<p>P.S. To my in-laws&#8211;come on, I&#8217;m just kidding. Stop being so cranky. That stresses me out&#8211;and we don&#8217;t want that, remember?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janiceclee.wordpress.com/916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janiceclee.wordpress.com/916/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=916&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janiceclee.wordpress.com/2010/11/23/playing-the-mcm-readiness-videos-on-the-ipod-and-droid/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc9b3018ce55a4ae5ecb44d41f13a9ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Janice</media:title>
		</media:content>

		<media:content url="http://janiceclee.files.wordpress.com/2010/11/formats.jpg" medium="image">
			<media:title type="html">formats</media:title>
		</media:content>
	</item>
		<item>
		<title>Never skip an SQL Saturday&#8230;</title>
		<link>http://janiceclee.wordpress.com/2010/09/20/sql-saturday/</link>
		<comments>http://janiceclee.wordpress.com/2010/09/20/sql-saturday/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 19:31:51 +0000</pubDate>
		<dc:creator>janiceclee</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[sql saturday]]></category>

		<guid isPermaLink="false">http://janiceclee.com/?p=766</guid>
		<description><![CDATA[The SQL Saturday in Raleigh last weekend was the second one I&#8217;ve attended and I loved almost every second of it! Thanks to the Triangle SQL Server User Group for organizing the event and congratulations. 1) There were just enough tracks and sessions to choose from. 2) There was ample time to go from one session...<br /><a class="more-link" href="http://janiceclee.wordpress.com/2010/09/20/sql-saturday/">Continue reading &#187;</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=766&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The SQL Saturday in Raleigh last weekend was the second one I&#8217;ve attended and I loved almost every second of it! Thanks to the <a href="http://www.tripass.org/dnn/">Triangle SQL Server User Group</a> for organizing the event and congratulations.</p>
<p>1) There were just enough tracks and sessions to choose from.<br />
2) There was ample time to go from one session to another.<br />
3) The sponsors were situated near the classrooms so it was impossible to miss them. (In SQL Saturday &#8211; Charlotte, the sponsors were in another building.)<br />
4) Parking was easy&#8230;(it was hard for me to find where I parked my car though&#8211;but then that happens all the time).<br />
5) The giveaways were nice. The sticky ball is the bomb! Apparently, it&#8217;s not a good idea to throw it to a flat-screen TV. Why? First, because it wouldn&#8217;t stick (I tried so many times). And second, I was told that if I didn&#8217;t stop trying, I would lose all my privileges. What&#8217;s with men and their televisions???<br />
6) It was well-attended, the speakers were awesome,  the food wasn&#8217;t bad, and&#8230;<br />
7) They hid the donuts! Seriously, LUCKY ME. That would have been another 5 lbs I&#8217;d have to lose this week.</p>
<p><strong>Why you should attend SQL Saturdays</strong><br />
This is what the post is all about really. I want to encourage you to <strong>never</strong> skip an SQL Saturday in your area. Let me tell you why.</p>
<p><strong>1) It&#8217;s the best time to get starstruck</strong><br />
Maybe you don&#8217;t get a kick out of it. But I do&#8211;and I&#8217;m not ashamed to say it. I get starstruck when I see SQL Server MVPs, authors, and tweeps. I think I&#8217;m innately a fan.  It&#8217;s just the way I&#8217;m built. SQL Saturdays is like the Oscars&#8211;only, it has smarter people. And it&#8217;s more fun. Orlando Bloom will never know my name (and I doubt he&#8217;ll ever win an Oscar)&#8211;but SQL Server authors and MVPs&#8211;if you stalk them long enough, they will. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  And they will really say hi!</p>
<p>Anyway, if you&#8217;re like me, some stalking tips:</p>
<p><em>a) Always have a pen when you&#8217;re having a book signed.</em><br />
Or just die from embarrassment your whole life. I had <a href="http://www.amazon.com/DBA-Survivor-Become-Rock-Star/dp/1430227877/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1285015486&amp;sr=8-1" target="_blank">DBA Survivor</a> signed and Thomas LaRock (<a href="http://thomaslarock.com/" target="_blank">blog </a>| <a href="http://twitter.com/sqlrockstar" target="_blank">twitter</a>) had to find a pen that worked to sign it. When I close my eyes, I still remember him saying, &#8220;you&#8217;re new to this stalking thing, huh?&#8221;. So bring a pen. Sponsors give it away&#8211;use it!</p>
<p>b) &#8220;I follow you!&#8221; <em>is not the best way to introduce yourself.</em><br />
And to follow it with &#8220;You&#8217;re lotsahelp, right? But I don&#8217;t know your name!&#8221; is not a good idea either.</p>
<p>Eric Humphrey (<a href="http://lotsahelp.blogspot.com/" target="_blank">blog</a> | <a href="http://twitter.com/lotsahelp" target="_blank">twitter</a>)  must have thought I was crazy. And no, of course I didn&#8217;t stop talking. I made it worse and said&#8211;&#8221;You look exactly like you do on Twitter!&#8221;. I said it like it was the world&#8217;s most amazing discovery. They say kids say the darndest things and man, I wish I had that excuse. He was nice about it though and replied that looking exactly like you do on Twitter is how it&#8217;s supposed to be. (If that is the case, I&#8217;d probably faint if I see <a href="http://twitter.com/sqlchicken" target="_blank">@sqlchicken</a>). <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>c) &#8220;You&#8217;re <a href="http://twitter.com/sqlcraftsman" target="_blank">sqlcraftsman</a>!&#8221; <em>is <strong>also</strong> not a good way to start a conversation.</em><br />
I said this and the guy said, &#8220;no, I&#8217;m Jim.&#8221;. OMG&#8211;talk about embarrassing.</p>
<p>So anyway, always start with a hello. In a normal world, that usually works best.</p>
<p><strong>2) Learn, learn, learn<br />
</strong>The learning benefit is a given. SQL Server is soo big. There&#8217;s so much to learn. SQL Saturdays allow you to learn about topics you&#8217;ve never heard of (xquery???), learn about topics you&#8217;ve kinda heard of (is powershell =  powerpuff?), and learn more about topics you already know (t-s-q-l). You get all these for free. You can ask questions just by raising your hand. And trust me, that&#8217;s a big deal. I always try that with my mother-in-law and it never works.</p>
<p>But you must be thinking&#8211;you can easily learn  from <a href="http://www.sqlpass.org/LearningCenter/SessionRecordings.aspx" target="_blank">PASS&#8217;s virtual sessions</a>. You can even learn just by downloading the sessions. Or you can just read a book. So why attend, right? Why make time?</p>
<p>One word: CHANCES.</p>
<p><strong>3) Chances<br />
</strong>Think of an SQL Saturday as match.com or eharmony.com. It&#8217;s a place where you meet people who do and like the same things that you do. And you don&#8217;t have to take a personality exam to get in. You just&#8211;go. For every session, you get the chance to find someone to like, to talk to, and to have fun with. You just have to grab the chance.</p>
<p>It&#8217;s so easy to pretend that the world consists of just your family, your team, and your current set of friends. But the world is bigger than that. And you can be so much more.</p>
<p>I had several surgeries last year. One was so bad I remember asking one doctor, &#8220;Will I die?&#8221;. And all he said was&#8211;&#8221;you&#8217;re at the right place at the right time.&#8221;  (Yeah, he did his best to be reassuring <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ).  When I woke up from the surgery (yay! I survived!), I felt lucky, yet, I also felt irrelevant. I started asking, how many people have I helped? How many people have I made an impact on?</p>
<p>How many have I reached out to?</p>
<p>Not too many. I&#8217;ve always been too busy.</p>
<p>So what does this have to do with going to SQL Saturdays? If you&#8217;re reading my blog, then most likely you are an SQL Server professional like me. I know it&#8217;s easy to keep to yourself. But events like SQL Saturdays give you a chance to be relevant. They give you a chance  to reach out to people you can <strong>easily</strong> have a huge impact on. Afterall, you&#8217;re already into similar things!</p>
<p>All it takes is one hello.</p>
<p><em>&#8220;Hello, I&#8217;m Janice Lee.&#8221;</em></p>
<p>Every session I attended, I said these words to the person beside me. I left the event with three new friends: Derek who went to Belgium early this morning for a vacation with his wife, Vishal who looked 13 but was really 29 years old and was an SQL Server whiz kid, and Elizabeth who quit her job because she knew what was important to her. I have their email addresses, I encouraged them to join twitter, and I think I convinced Derek to ditch his planner and get himself a smartphone when he comes back from Belgium.</p>
<p>You must be thinking&#8211;so what? Well, this is the chance I was talking about. In one day, I just expanded my world and added three people to it. I told them about #sqlhelp and I encouraged them to blog and to be active in the community. I talked, I reached out, and I gave myself the chance to be relevant. You can&#8217;t do this in a virtual session. You can&#8217;t do this when you just read a book. You can&#8217;t do this when you don&#8217;t go out there.</p>
<p>I know it takes two to tango. Some people just don&#8217;t like to interact so just leave them alone (unless you&#8217;re like me who just pretend to not get the message <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ). Don&#8217;t let it stop you from taking the chance though and from saying hello. Because that one hello can make a difference.</p>
<p><strong>Conclusion</strong><br />
Don&#8217;t wake up one day realizing that there&#8217;s a world out there&#8211;as if that fact wasn&#8217;t staring at you every time you opened your eyes. When you get the chance to attend events like this&#8211;grab it. And as I said&#8211;going to one to learn is a given. But definitely don&#8217;t ignore the additional benefits. Make time to attend it, smile, and say hello. This way, you&#8217;ll get and learn more than SQL Server. There&#8217;s more to life afterall than databases <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>P.S. Shout out to Allen White (<a href="http://sqlblog.com/blogs/allen_white/default.aspx" target="_blank">blog </a>| <a href="http://sqlblog.com/blogs/allen_white/default.aspx" target="_blank">twitter</a>) , Kevin Boles (<a href="http://twitter.com/TheSQLGuru">twitter</a>), Tim Chapman (<a href="http://sqlservernation.com/">blog</a> | <a href="http://twitter.com/chapmandew">twitter</a>), Grant Fritchey (<a href="http://scarydba.wordpress.com/">blog</a> | <a href="http://twitter.com/gfritchey">twitter</a>), Andy Leonard (<a href="http://sqlblog.com/blogs/andy_leonard">blog </a>| <a href="http://twitter.com/andyleonard">twitter</a>), and Eli Weinstock-Herman (<a href="http://tiernok.com/" target="_blank">blog </a>| <a href="http://twitter.com/tarwn">twitter</a>) who all said hi. And to the guy who sat beside me and gave me the book he won&#8211;THANKS! Shawn, right?</p>
<p>And for the wonderful note on my book and all the kind words, thanks to Thomas LaRock (<a href="http://thomaslarock.com/" target="_blank">blog </a>| <a href="http://twitter.com/sqlrockstar" target="_blank">twitter</a>). I was a lost puppy early this year (what an understatement). I listened to your <a href="http://tutorials.sqlserverpedia.com/SQLServerPedia-20090831-Blogging.mp3" target="_blank">podcast</a> and I found my way home. I&#8217;m hoping I can pay it forward.</p>
<p>For more information on SQL Saturday, go to <a href="http://www.sqlsaturday.com">www.sqlsaturday.com</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janiceclee.wordpress.com/766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janiceclee.wordpress.com/766/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=766&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janiceclee.wordpress.com/2010/09/20/sql-saturday/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
<enclosure url="http://tutorials.sqlserverpedia.com/SQLServerPedia-20090831-Blogging.mp3" length="3479636" type="audio/mpeg" />
<enclosure url="http://tutorials.sqlserverpedia.com/SQLServerPedia-20090831-Blogging.mp3" length="3479636" type="audio/mpeg" />
<enclosure url="http://tutorials.sqlserverpedia.com/SQLServerPedia-20090831-Blogging.mp3" length="3479636" type="audio/mpeg" />
	
		<media:content url="http://1.gravatar.com/avatar/dc9b3018ce55a4ae5ecb44d41f13a9ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Janice</media:title>
		</media:content>
	</item>
		<item>
		<title>PASSion</title>
		<link>http://janiceclee.wordpress.com/2010/08/30/passion_in_pass/</link>
		<comments>http://janiceclee.wordpress.com/2010/08/30/passion_in_pass/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 20:35:20 +0000</pubDate>
		<dc:creator>janiceclee</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[PASS]]></category>

		<guid isPermaLink="false">http://janiceclee.com/?p=720</guid>
		<description><![CDATA[Many, many, many years ago, I wanted to change the world. Call it idealism or just plain naivete&#8211;but I really, honestly wanted to make a difference.  This text is from my high school yearbook. I think the guy who wrote this to describe me wanted to kiss my bacon. When he said four-digit IQ, he probably meant...<br /><a class="more-link" href="http://janiceclee.wordpress.com/2010/08/30/passion_in_pass/">Continue reading &#187;</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=720&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Many, many, many years ago, I wanted to change the world. Call it idealism or just plain naivete&#8211;but I really, honestly wanted to make a difference. </p>
<p><a href="http://janiceclee.files.wordpress.com/2010/08/high_school_yrbok.jpg"></a></p>
<p><a href="http://janiceclee.files.wordpress.com/2010/08/hs_yrbook.jpg"><img class="alignnone size-full wp-image-743" title="hs_yrbook" src="http://janiceclee.files.wordpress.com/2010/08/hs_yrbook.jpg?w=560" alt=""   /></a></p>
<p>This text is from my high school yearbook. I think the guy who wrote this to describe me wanted to kiss my bacon. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  When he said <em>four-digit IQ</em>, he probably meant .0001. But seriously, back then, I really did want to make the world a better place. That this slowly became a cliche as I grew older is really sad and disappointing.</p>
<p>I&#8217;m not writing about the <a href="http://elections.sqlpass.org/Discussion.aspx" target="_blank">PASS election process</a>. I&#8217;m too new in PASS to even have a strong opinion about it. I&#8217;m also not writing about Steve Jones. The only direct relationship I have with Steve Jones are his Voice of the DBA podcasts. However, I&#8217;ve been reading some articles about him in the past weeks&#8230;and, looks like Steve Jones is more than a podcast to a lot of people. These people are not happy about his  exclusion from the Board of Directors election and what&#8217;s awesome is, these people are speaking up about it. Passionately.   </p>
<p>In the short time that I&#8217;ve been with the SQL community, I&#8217;ve seen passion so hot it burns. It reminds me of the days when I actually thought I could change the world.</p>
<p>I&#8217;m different now from the girl described above. I&#8217;m no longer desperate to make the world a better place. In the workplace, I&#8217;ve mastered the art of avoiding confrontations. It&#8217;s just more&#8230;peaceful. But being part of a community where people stick their necks out for people and ideals despite the possibility of conflict is kinda inspiring. It makes me think it may be possible for me to change the world afterall. Peace can be overrated anyway; I think I can forego it once in awhile for the <em>possibility</em> of something as underrated as change.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janiceclee.wordpress.com/720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janiceclee.wordpress.com/720/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=720&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janiceclee.wordpress.com/2010/08/30/passion_in_pass/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc9b3018ce55a4ae5ecb44d41f13a9ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Janice</media:title>
		</media:content>

		<media:content url="http://janiceclee.files.wordpress.com/2010/08/hs_yrbook.jpg" medium="image">
			<media:title type="html">hs_yrbook</media:title>
		</media:content>
	</item>
		<item>
		<title>Dumbing it down: Why you should verify backups</title>
		<link>http://janiceclee.wordpress.com/2010/08/05/dumbing-it-down-why-you-should-verify-backups/</link>
		<comments>http://janiceclee.wordpress.com/2010/08/05/dumbing-it-down-why-you-should-verify-backups/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 14:26:40 +0000</pubDate>
		<dc:creator>janiceclee</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[restore]]></category>

		<guid isPermaLink="false">http://janiceclee.com/?p=647</guid>
		<description><![CDATA[&#8220;Well, I just made a copy of the data files and the copy failed and now they&#8217;re corrupt and the backups we have are not valid&#8230;and&#8230;and now I don&#8217;t know what to do and&#8230;&#8221; Of Wasabis Wasabi chips. I bought this last weekend. As soon as I took my first bite&#8230;I stuck my tongue out...<br /><a class="more-link" href="http://janiceclee.wordpress.com/2010/08/05/dumbing-it-down-why-you-should-verify-backups/">Continue reading &#187;</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=647&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><em>&#8220;Well, I just made a copy of the data files and the copy failed and now they&#8217;re corrupt and the backups we have are not valid&#8230;and&#8230;and now I don&#8217;t know what to do and&#8230;&#8221;</em></p>
<p><em><strong>Of Wasabis</strong></em></p>
<p><a href="http://janiceclee.files.wordpress.com/2010/07/wasabi.jpg"><img class="size-full wp-image-652 alignleft" title="wasabi" src="http://janiceclee.files.wordpress.com/2010/07/wasabi.jpg?w=560" alt=""   /></a>Wasabi chips. I bought this last weekend. As soon as I took my first bite&#8230;I stuck my tongue out and said&#8211;&#8221;Ugh! It tastes like wasabi!&#8221;</p>
<p>The package was labeled <em>wasabi</em>. It had a picture of a <em>wasabi</em>. Not sure really why I was so surprised. I guess it tasted too much like wasabi. Yeah, yeah&#8230;I know what you&#8217;re thinking&#8230;how else was it supposed to taste like??? I know it doesn&#8217;t make sense but the taste really DID overwhelm me. Just saying&#8230;</p>
<p><em><strong>Of Bikinis</strong></em></p>
<p>Three years ago, I copied a bunch of pictures to an external drive. I actually checked quickly if the transfer was a success after&#8230;keyword being quickly. I just looked at the thumbnails and all looked well so I deleted the original images from my laptop. When I opened the pictures last Saturday, half of the pictures looked like this:</p>
<p style="text-align:center;"><a href="http://janiceclee.files.wordpress.com/2010/07/corrupted_jpeg.jpg"><img class="size-full wp-image-648 aligncenter" title="corrupted_jpeg" src="http://janiceclee.files.wordpress.com/2010/07/corrupted_jpeg.jpg?w=560" alt=""   /></a></p>
<p>I lost a set of pictures with my college friends, a set of pictures with my dogs, and ONE bikini picture (yes, I could actually fit in one a long, long, long time ago).</p>
<p><em><strong>Of Database Backups</strong></em></p>
<p>I think some people forget that backups are just operating system files&#8211;like my pictures are files, like PSTs are files, and like documents are files. And files behave like files&#8211;the same way wasabi chips taste like wasabi. When you move files or copy them or email them or write to them&#8211;anything can happen. Files can get corrupted. So when you find your unverified backup files to be corrupted or invalid, it&#8217;s not really a question of why it happened&#8211;but why is it that you didn&#8217;t verify them knowing that they&#8217;re basically &#8220;just files&#8221;? This probably sounds so dumbed down but this is as non-technical as I can make it to be: backup files are files. How redundant, eh?</p>
<p><strong>Instilling Paranoia<br />
</strong>Be paranoid. Do verify your backups.  Get started now. Because when you&#8217;re the one in charge of the database, whether by accident or not,  you just can&#8217;t forget that there&#8217;s more than a bikini picture at stake.</p>
<p>Now, really, all this talk about bikinis is making me want to skip these donuts. Next topic please.</p>
<p><strong>More Information</strong><br />
<a href="http://msdn.microsoft.com/en-us/library/ms189587.aspx" target="_blank">Verifying Backups</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janiceclee.wordpress.com/647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janiceclee.wordpress.com/647/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=647&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janiceclee.wordpress.com/2010/08/05/dumbing-it-down-why-you-should-verify-backups/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc9b3018ce55a4ae5ecb44d41f13a9ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Janice</media:title>
		</media:content>

		<media:content url="http://janiceclee.files.wordpress.com/2010/07/wasabi.jpg" medium="image">
			<media:title type="html">wasabi</media:title>
		</media:content>

		<media:content url="http://janiceclee.files.wordpress.com/2010/07/corrupted_jpeg.jpg" medium="image">
			<media:title type="html">corrupted_jpeg</media:title>
		</media:content>
	</item>
		<item>
		<title>Alternative to restoring to a point in TIME</title>
		<link>http://janiceclee.wordpress.com/2010/07/25/alternative-to-restoring-to-a-point-in-time/</link>
		<comments>http://janiceclee.wordpress.com/2010/07/25/alternative-to-restoring-to-a-point-in-time/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 02:58:17 +0000</pubDate>
		<dc:creator>janiceclee</dc:creator>
				<category><![CDATA[Disaster Recovery]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[accidental delete]]></category>
		<category><![CDATA[fn_dblog]]></category>
		<category><![CDATA[fn_dump_dblog]]></category>
		<category><![CDATA[point in time restore]]></category>
		<category><![CDATA[point-in-time recovery]]></category>
		<category><![CDATA[Recovering to a Log Sequence Number]]></category>
		<category><![CDATA[Recovering to an LSN]]></category>

		<guid isPermaLink="false">http://janiceclee.com/?p=601</guid>
		<description><![CDATA[&#8220;What are you smiling about?” my friend asked. &#8220;I&#8217;m just giddy&#8230;” I replied. &#8220;Why?&#8221; &#8220;You won&#8217;t understand.&#8221; &#8220;Try me.&#8221; &#8220;Well, last night, I found out about fn_dump_dblog.&#8221; &#8220;Uh-huh. So what are those? Shoes?&#8221; Hooooo-kay! Moving on&#8230; With a transaction log backup, you gain the ability to restore your database to a point-in-time contained in the...<br /><a class="more-link" href="http://janiceclee.wordpress.com/2010/07/25/alternative-to-restoring-to-a-point-in-time/">Continue reading &#187;</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=601&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><em>&#8220;What are you smiling about?” my friend asked.<br />
&#8220;I&#8217;m just giddy&#8230;” I replied.<br />
&#8220;Why?&#8221;<br />
&#8220;You won&#8217;t understand.&#8221;<br />
&#8220;Try me.&#8221;<br />
&#8220;Well, last night, I found out about <strong>fn_dump_dblog</strong>.&#8221;<br />
&#8220;Uh-huh. So what are those? Shoes?&#8221;</em></p>
<p>Hooooo-kay! <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Moving on&#8230;</p>
<p>With a transaction log backup, you gain the ability to restore your database to a point-in-time contained in the backup. For example, if a table is accidentally emptied via a DELETE operation that&#8217;s not within an explicit transaction, you can:</p>
<p>1) If possible, stop all database activities as soon as you learn about the accident then take a transaction log backup.</p>
<p>2) Restore the most recent full database backup and most recent differential backup (if any) to a new database (WITH NORECOVERY).</p>
<p>3) Apply your transaction logs up to the point prior to the delete.</p>
<p>4) When you have your deleted records back (in the new database), re-insert them to the table in the original database. Once you have inserted the data back, you would have to do some work to ensure that your database is how it really should be (i.e. if the DELETE that you’re trying to undo didn&#8217;t happen, what would the database state be?).</p>
<p><strong>The tricky part really is figuring out up to what TIME to restore.</strong></p>
<p>1) If you know the exact time, just apply each transaction log backup and specify STOPAT=TIME, WITH RECOVERY. As long as the time you specified is not met, the database will remain unrecovered. For example,</p>
<pre class="brush: sql; title: ; notranslate">
RESTORE LOG NewDB FROM DISK='C:BackupAdventureWorks.trn' WITH RECOVERY,
STOPAT = 'Aug 12, 2009 10:00:00 AM'
GO
</pre>
<p>2) If you know just the time range (for example, from 3:15PM-3:30PM), it&#8217;s a bit more tricky. You need to restore your log backups to different times (3:15PM, 3:16PM, 3:17PM, and so on) using STOPAT and you need to be able to look at the data each time before restoring more backups, and before changing the STOPAT time. SQL Server allows you to do this using an option called STANDBY. It allows you to recover your database, read it (you cannot modify), and restore more log backups. Check Tibor Karaszi&#8217;s <a href="http://www.karaszi.com/SQLServer/info_minimizing_data_loss.asp" target="_blank">Minimizing Data Loss</a> for more information on how to do this.</p>
<p>The less you know about the time the accident happened, the more tedious the recovery gets. Imagine doing this if all you know is that the delete occurred <em>yesterday</em> and no time is specified&#8230;12 midnight&#8230;1am&#8230;2am&#8230;it&#8217;s not a good situation to be in.</p>
<p><strong>Is there an alternative?</strong><br />
Yes. You can restore to a log sequence number instead&#8211;or to a point before it. You can look at restoring to an LSN as an alternative or a complement to the point-in-TIME restore. <strong>There&#8217;s some guesswork involved though</strong>. What you need are:</p>
<p>1) The name of the table<br />
2) The number of records deleted (or at least, an estimate)<br />
3) The time of the disaster/accident. You will see later that this is still a nice-to-have.</p>
<p>To illustrate, let&#8217;s delete all records in the AdventureWorks&#8217;s Production.TransactionHistory table. I&#8217;m using SQL Server 2005.</p>
<pre class="brush: sql; title: ; notranslate">
--delete all records
delete from Production.TransactionHistory
</pre>
<p>This deletes 113443 records.</p>
<p><strong>Finding the LSN of the Point of Disaster</strong><br />
<em>fn_dblog</em> is a system UDF that&#8217;s undocumented by Microsoft. Information about it can be found online (yeah, it&#8217;s very well documented for something that&#8217;s supposedly <em>undocumented</em>). <em>fn_dblog</em> exposes to you some information about the database&#8217;s transaction log.</p>
<p>The plan is to use <em>fn_dblog</em> first to find the LSN of the point of disaster, and, if we don&#8217;t find it, to use <em>fn_dump_dblog </em>instead. <em>fn_dump_dblog</em> shows similar information as <em>fn_dblog</em> and more. <em>fn_dump_dblog</em> can read transaction log backups.</p>
<p>If the transaction that we&#8217;re looking for is not in the database&#8217;s transaction log, most likely it&#8217;s been overwritten and is already in a transaction log backup.</p>
<p><strong>Reminder: </strong>Use fn_dblog, fn_dbdump_dblog, and other undocumented functions with caution, especially in production DBs. Actually, when I ran the scripts I used in this post on my development DB, they were extremely slow.</p>
<p>Also note that future versions or service packs may change how these functions behave. Make sure to test the scripts where you use them every time you make a change to your SQL Server installation.</p>
<p>1) Find the transaction’s Transaction ID. All the delete operations within the transaction will belong to one Transaction ID. We can find this using <em>fn_dblog</em> and the estimated/actual number of deletions.</p>
<pre class="brush: sql; title: ; notranslate">
USE AdventureWorks
GO
SELECT [Transaction ID], count(*)
FROM fn_dblog(DEFAULT, DEFAULT)
where AllocUnitName LIKE '%Production.TransactionHistory%'--table name
GROUP BY [Transaction ID]
HAVING COUNT(*) &gt;= 113443 --(estimated/actual) number of deleted records
</pre>
<p>The result is this:</p>
<p>Transaction ID REC_COUNT<br />
0000:0000130c 340329</p>
<p>(1 row(s) affected)</p>
<p>Deletions that are done on heaps will have a count that&#8217;s closer to the actual number of records deleted. The presence of indexes will result to a higher count but just keep in mind that the number of records deleted will be the minimum count.</p>
<p>If above query results to more than one Transaction ID, knowing the time (or even just a time range) that the delete happened really helps. We will discuss this later.</p>
<p>2) Next, get all the operations that have the Transaction ID we found in the previous step to verify if it is the transaction we are looking for.</p>
<pre class="brush: sql; title: ; notranslate">
SELECT
[Current LSN],
Operation,
Context,
[Transaction ID],
[AllocUnitId],
[AllocUnitName],
[UID],
[SPID],
[Begin Time],
[Transaction Name]
FROM fn_dblog(DEFAULT, DEFAULT)
WHERE [Transaction ID] = '0000:0000130c'
ORDER BY [Current LSN]
</pre>
<p>The results are as shown below:</p>
<p><a href="http://janiceclee.files.wordpress.com/2010/07/fn_dblog01.jpg"><img class="alignnone size-full wp-image-617" title="fn_dblog01" src="http://janiceclee.files.wordpress.com/2010/07/fn_dblog01.jpg?w=560" alt=""   /></a></p>
<p><em>Verifying the Results</em><br />
The delete we performed will show as Operations = LOP_DELETE_ROWS in the transaction log. That&#8217;s what we see in (1). The table we deleted from has the following indexes:</p>
<p><a href="http://janiceclee.files.wordpress.com/2010/07/table_indexes.jpg"><img class="alignnone size-full wp-image-618" title="table_indexes" src="http://janiceclee.files.wordpress.com/2010/07/table_indexes.jpg?w=560" alt=""   /></a></p>
<p>and this coincides with (2).</p>
<p>The date in (3) is what we would have to use if we have several Transaction ID candidates and we&#8217;re not exactly sure which transaction to select. If we have the time of the accident (or at least, an estimate) we can select the transaction that has a [BEGIN TIME] closest to the time we have. This is the reason I said earlier that the date is nice to have.</p>
<p>So, based on the results, it looks like we have the correct Transaction ID.</p>
<p>4) Look for the LSN of the point of disaster.</p>
<p>This would be the first LSN of the transaction and the value of Operation should be LOP_BEGIN_XACT. In this example, it’s 00000026:00000458:0002. <strong>BINGO!</strong> This is our point of disaster. We want to restore not to this LSN but right before it.</p>
<p><strong>Performing the Restore</strong><br />
Restore the most recent database backup and differential backup (if present) and apply the transaction log backups specifying the LSN where the restore should stop (right before).</p>
<pre class="brush: sql; title: ; notranslate">
--execute this after restoring the full database backup, the differential backup (if any), and the subsequent transaction log backups
RESTORE LOG [NewDB] FROM  DISK = N'C:BackupAdventureWorks.trn' --NewDB is the new database we're restoring to
   WITH STOPBEFOREMARK= 'lsn:00000026:00000458:0002' --this is the LSN of the beginning of the transaction which is our point of disaster
GO
RESTORE DATABASE NewDB
   WITH RECOVERY;
</pre>
<p>Once the restore is completed, extract the <em>deleted</em> data from the new db and re-insert them to the original table.</p>
<p><strong>What if we can’t find the delete transaction using <em>fn_dblog</em>?</strong><br />
Turn on trace flag 2537 and try again. If you still can’t find it, a transaction log backup may have been performed already and the delete transaction in the log may have already been overwritten. If this is the case, then we need to do the same steps we did above but this time, we want to use the <em>fn_dump_dblog</em> command. I discovered <em>fn_dump_dblog</em> via&#8230;what else&#8230;GOOGLE! Yeah, finding it made me GIDDY and no, <em>fn_dump_dblog</em> “<em>ain&#8217;t”</em> shoes.</p>
<p>As I said earlier, it shows pretty much the same info as <em>fn_dblog</em> BUT it has the added ability to read transaction log backups. Because we no longer have the transactions in the database&#8217;s transaction log, we will attempt to read the transaction log backup file that was created right after the accident happened using <em>fn_dump_dblog</em>.</p>
<pre class="brush: sql; title: ; notranslate">
SELECT [Transaction ID], count(*)
FROM fn_dump_dblog(DEFAULT, DEFAULT,DEFAULT, DEFAULT, 'C:BackupAdventureWorks.trn', DEFAULT,DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT)
GROUP BY [Transaction ID]
HAVING COUNT(*) &gt;= 113443 --(estimated/actual) number of deleted records
</pre>
<p>In this test case, we only get one Transaction ID that meets the conditions we specified (it’s the same Transaction ID that we got earlier using <em>fn_dblog</em>). If there are more, we need to look at the operations of each Transaction ID and make an (educated) guess as to what Transaction ID corresponds to the accidental delete. The problem with <em>fn_dump_dblog</em> is for some <em>undocumented</em> reason, the AllocUnitName is empty. This makes it difficult to know what object/entity the DELETE operation was performed on. Regardless, there are still ways we can extract the information we need.</p>
<p>To check the operations of the Transaction ID that results from above code, we run the following:</p>
<pre class="brush: sql; title: ; notranslate">
SELECT
[Current LSN],
Operation,
Context,
[Transaction ID],
[AllocUnitId],
[AllocUnitName],
[UID],
[SPID],
[Begin Time],
[Transaction Name]
FROM fn_dump_dblog(DEFAULT, DEFAULT,DEFAULT, DEFAULT, 'C:BackupAdventureWorks.trn', DEFAULT,DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT)
WHERE [Transaction ID] = '0000:0000130c' --change this to WHERE [Transaction ID] IN ('0000:0000130c', ...) if there's more than 1 Transaction ID candidate
ORDER BY [Current LSN]
</pre>
<p>Here&#8217;s the result:</p>
<p><a href="http://janiceclee.files.wordpress.com/2010/07/fn_dump_dblog.jpg"><img class="alignnone size-full wp-image-621" title="fn_dump_dblog" src="http://janiceclee.files.wordpress.com/2010/07/fn_dump_dblog.jpg?w=560" alt=""   /></a></p>
<p>I have highlighted the fields you can look at to verify the LSN of the point of disaster. Pick the transaction that has a BEGIN TIME that&#8217;s closest to the time of accident. The time information here becomes more important since we don&#8217;t have the AllocUnitName. For this reason, I would recommend that you try to find the LSN while the transaction is still in the database&#8217;s log.</p>
<p><strong>Tips</strong></p>
<p>a) If you&#8217;re in full recovery model and have done a full database backup yet have never taken transaction log backups, you should be. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  If a minor accident like the example discussed in this post happens to you, you can still use above steps. I recommend executing the fn_dblog command first to get the LSN of the point of disaster and then perform a transaction log backup (you would need it to do a point-in-time restore.) And of course, going forward, continue doing transaction log backups.</p>
<p>b) Third-party transaction log reading tools can help you eliminate all the guesswork so also consider these options when trying to find the LSN of the point of disaster.</p>
<p>c) Going forward, secure your database to make sure users are not allowed to make these disastrous changes to the production database. Also consider using transaction log shipping and configure it such that the logs are restored to your destination only after some delay. This gives you quick access to an older state of your database should a disaster like the one discussed in this post happens. I&#8217;ll be discussing this more in detail in a future post. Tibor Karaszi&#8217;s <a href="http://www.karaszi.com/SQLServer/info_minimizing_data_loss.asp" target="_blank">Minimizing Data Loss</a> also has some tips on avoiding this disaster in the future.</p>
<p><strong>More Information</strong><br />
<a href="http://msdn.microsoft.com/en-us/library/ms191459.aspx">Recovering to a Log Sequence Number</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janiceclee.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janiceclee.wordpress.com/601/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=601&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janiceclee.wordpress.com/2010/07/25/alternative-to-restoring-to-a-point-in-time/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc9b3018ce55a4ae5ecb44d41f13a9ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Janice</media:title>
		</media:content>

		<media:content url="http://janiceclee.files.wordpress.com/2010/07/fn_dblog01.jpg" medium="image">
			<media:title type="html">fn_dblog01</media:title>
		</media:content>

		<media:content url="http://janiceclee.files.wordpress.com/2010/07/table_indexes.jpg" medium="image">
			<media:title type="html">table_indexes</media:title>
		</media:content>

		<media:content url="http://janiceclee.files.wordpress.com/2010/07/fn_dump_dblog.jpg" medium="image">
			<media:title type="html">fn_dump_dblog</media:title>
		</media:content>
	</item>
		<item>
		<title>Are we there yet?</title>
		<link>http://janiceclee.wordpress.com/2010/07/08/are-we-there-yet/</link>
		<comments>http://janiceclee.wordpress.com/2010/07/08/are-we-there-yet/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 18:29:43 +0000</pubDate>
		<dc:creator>janiceclee</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://janiceclee.com/?p=561</guid>
		<description><![CDATA[Inspirational stories&#8230;don&#8217;t we just love them? Stories that give us hope and direction&#8230;like this one from @BrentO. It&#8217;s no Chicken Soup for the Soul but it gives you a glimpse of how it is and how it feels to get there. &#8220;Get where?&#8221;, you ask. There. That place where dreams are. It gets frustrating sometimes...<br /><a class="more-link" href="http://janiceclee.wordpress.com/2010/07/08/are-we-there-yet/">Continue reading &#187;</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=909&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Inspirational stories&#8230;don&#8217;t we just love them? Stories that give us hope and direction&#8230;like this <a href="http://www.brentozar.com/archive/2010/04/rock-stars-normal-people-and-you/" target="_blank">one</a> from <a href="http://twitter.com/brentO" target="_blank">@BrentO</a>. It&#8217;s no Chicken Soup for the Soul but it gives you a glimpse of how it is and how it feels to get <strong><em>there</em></strong>.</p>
<p>&#8220;Get where?&#8221;, you ask. <em><strong>There</strong></em>. That place where dreams are.</p>
<p>It gets frustrating sometimes to hear ourselves saying&#8230;</p>
<p><em>I don&#8217;t know that.<br />
I haven&#8217;t tried it.<br />
I have no idea what you&#8217;re talking about.<br />
I have never heard of it.<br />
That sounds familiar but I&#8217;m not sure.<br />
I&#8217;ve never really set one up.<br />
I kinda know the concept but&#8230;I&#8217;d have to review how to do that.<br />
</em></p>
<p>Wouldn&#8217;t it be just nice to say&#8230;<strong>I know</strong>.</p>
<p>Reading inspirational stories give you that feeling of &#8220;Yes, I can do it too.&#8221; But then you go back to your daily grind, you look at your goals, and you realize, man, you still have a long way to go. And it&#8217;s frustrating.</p>
<p>I remember a conversation I had once with some family friends. I asked, &#8220;How do I make sure I don&#8217;t get caught for speeding?&#8221; One advised never to drive more than 5 mph over. Another said slow down if I see a suspiciously-cop-looking car. My brother-in-law said just always make sure the driver of the car in front of me is driving just as fast or faster.</p>
<p>Then finally, my 10-year old niece said, &#8220;Aunt Janice, if you drive the speed limit, I don&#8217;t think you&#8217;ll get caught.&#8221; And we all laughed.</p>
<p>But it&#8217;s not funny, isn&#8217;t it? Because truth is, there shouldn&#8217;t be a way &#8220;around&#8221; things. Getting &#8220;there&#8221; takes time. And just like driving, sometimes we all wish we had left earlier.</p>
<p>We all have moments like this&#8230;of self-doubt, of impatience, of thinking, &#8220;man, I wish I started this a long time ago!&#8221;.</p>
<p>When I told my bestfriend this, she said that my problem&#8217;s I keep focusing on how far I still have to go to get to my destination. She said that sometimes, I need to look back instead and see how far I&#8217;ve come. She said <em>pause and give yourself some credit</em>.</p>
<p>This is not an inspirational story for I don&#8217;t seek to inspire. If you&#8217;re reading this though and you get it, I just wanted you to know, you&#8217;re not alone.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janiceclee.wordpress.com/909/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janiceclee.wordpress.com/909/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=909&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janiceclee.wordpress.com/2010/07/08/are-we-there-yet/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc9b3018ce55a4ae5ecb44d41f13a9ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Janice</media:title>
		</media:content>
	</item>
		<item>
		<title>Do I need to (re)do a full db backup to start a backup chain?</title>
		<link>http://janiceclee.wordpress.com/2010/07/02/redo-full-db-backup/</link>
		<comments>http://janiceclee.wordpress.com/2010/07/02/redo-full-db-backup/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 18:38:55 +0000</pubDate>
		<dc:creator>janiceclee</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[full recovery model]]></category>
		<category><![CDATA[sql server backup]]></category>

		<guid isPermaLink="false">http://janiceclee.com/?p=511</guid>
		<description><![CDATA[&#8220;There are no stupid questions&#8221;. I heard that when I was in first grade and I still believe that it&#8217;s true. Maybe rude, rhetorical, or unclear&#8230;but stupid? Nah. I&#8217;ve been blessed to have people around me who have never made me feel that my questions were stupid. They have told me I&#8217;m dense though&#8230;so go...<br /><a class="more-link" href="http://janiceclee.wordpress.com/2010/07/02/redo-full-db-backup/">Continue reading &#187;</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=511&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><em>&#8220;There are no stupid questions&#8221;. I heard that when I was in first grade and I still believe that it&#8217;s true. Maybe rude, rhetorical, or unclear&#8230;but stupid? Nah. </em></p>
<p>I&#8217;ve been blessed to have people around me who have never made me feel that my questions were stupid. They have told me I&#8217;m dense though&#8230;so go figure. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Anyway&#8211;I know it doesn&#8217;t seem like I just wrote a disclaimer..but I did.</p>
<p>Last week, I was performing tests on transaction log backups. Everytime I restored a database backup of a database that was using a full recovery model to a <strong>new</strong> database, I would immediately do a full database backup to start the backup chain. (I needed to create transaction log backups for testing.) After doing this process 5 times, I thought&#8211;is this really necessary? That is, if I create a full database backup of a database that&#8217;s using the full recovery model, then restore it to a different db, do I really still need to make a full database backup *just* to start the backup chain? Can I just perform a transaction log backup without doing a full database backup? Afterall, I already have a full db backup. <em>Will the database be in autotruncate mode right after the restore?</em></p>
<p><em>Note: Not familiar with recovery models? Read <a href="http://msdn.microsoft.com/en-us/library/ms189275.aspx" target="_blank">Recovery Model Overview</a> and <a href="http://sqlblog.com/blogs/kalen_delaney/archive/2010/03/01/10205.aspx">When is FULL Recovery not Really FULL Recovery</a></em>.</p>
<p><strong>What I kinda know<br />
</strong>When a database is using the simple recovery model, it is in autotruncate mode. When you switch the recovery model from SIMPLE to FULL or BULK_LOGGED, it is important to perform a full database backup first to complete the change.  If you don&#8217;t, then the database will remain in autotruncate mode. Autotruncate simply means SQL Server is automatically truncating the database&#8217;s log when it gets almost full.</p>
<p>To check if a database is in autotruncate mode, I use below code:</p>
<pre class="brush: sql; title: ; notranslate">
--last_log_backup_ls is NULL if in autotruncate mode
select B.name, A.last_log_backup_lsn
from sys.database_recovery_status A inner join sys.databases B
on (A.database_id = B.database_id)
</pre>
<p><strong>So to answer my questions&#8230;<br />
</strong>I did some tests. First, I created a test database (TestDB), changed its recovery model to FULL, and performed a full database backup.</p>
<pre class="brush: sql; title: ; notranslate">
USE master
go
--Create the test database
CREATE DATABASE TestDB;
GO
--Set the recovery model to full
ALTER DATABASE TestDB SET RECOVERY FULL;
GO
--Full database backup
BACKUP DATABASE TestDB TO DISK = 'c:BackupTestDB_Full.bak';
GO
</pre>
<p>Right after I did  a full database backup, I checked and as expected, the database was no longer in autotruncate mode. (The last_log_backup_lsn was <strong>not</strong> null).</p>
<p>Next, I restored the full database backup to a different database (TestDB<strong>2</strong>).</p>
<pre class="brush: sql; title: ; notranslate">
RESTORE DATABASE [TestDB2] FROM  DISK = N'c:BackupTestDB_Full.bak' WITH RECOVERY,
      MOVE 'TestDB' TO
'C:TestDB2.mdf',
      MOVE 'TestDB_log'
TO 'C:TestDB2_log.ldf'
GO
</pre>
<p>Right after the restore completed, I checked if the TestDB2 database was in autotruncate mode:</p>
<pre class="brush: sql; title: ; notranslate">
--last_log_backup_ls is NULL if in autotruncate mode
select A.last_log_backup_lsn from sys.database_recovery_status A inner join sys.databases B on (A.database_id = B.database_id)
where B.name = 'TestDB2'
</pre>
<p><strong>It wasn&#8217;t</strong>. The result was not NULL even if I haven&#8217;t performed any backup&#8230;</p>
<p><a href="http://sqlmyway.files.wordpress.com/2010/07/db_info.jpg"><img class="alignnone size-full wp-image-526" title="db_info" src="http://sqlmyway.files.wordpress.com/2010/07/db_info.jpg?w=560" alt=""   /></a></p>
<p>I checked if I could do a transaction log backup without doing a full database backup.</p>
<pre class="brush: sql; title: ; notranslate">
--Perform a transaction log backup
BACKUP LOG TestDB2 TO  DISK = N'C:BackupTestDB2.trn';
GO
</pre>
<p>Success! SQL Server allowed me to!</p>
<p><strong>So, in summary,</strong></p>
<p>1) Will the database be in autotruncate mode right after restore? <strong>No</strong>.<br />
2) If we create a full database backup of a database in full recovery model, then restore that to a different db, can we just perform a transaction log backup without doing a full database backup? <strong>Yes</strong>.</p>
<p><strong>Why?</strong><br />
I think it&#8217;s because backup chains are primarily dependent on continuous LSNs. According to this <a href="http://msdn.microsoft.com/en-us/library/ms190729.aspx" target="_blank">article</a>, two backups are consecutive if the LastLSN of the first one is greater than  or equal to the FirstLSN of the next one. In our test&#8230;</p>
<pre class="brush: sql; title: ; notranslate">
RESTORE HEADERONLY
   FROM DISK = N'C:BackupTestDB_Full.bak'
</pre>
<p>FirstLSN: 49000000006100037<br />
<span style="color:#ff0000;">LastLSN:  49000000007900001</span></p>
<pre class="brush: sql; title: ; notranslate">
RESTORE HEADERONLY
   FROM DISK = N'C:BackupTestDB2.trn'
</pre>
<p><span style="color:#ff0000;">FirstLSN: 49000000007900001</span><br />
LastLSN: 49000000009300001</p>
<p>they&#8217;re equal. And yup, I tried restoring and it worked. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I repeated the test. This time though, right after I restored to a new database, I performed a full database backup before doing a transaction log backup.</p>
<pre class="brush: sql; title: ; notranslate">
USE master
go
--Create the test database
CREATE DATABASE AnotherTestDB;
GO

--Set the recovery model to full
ALTER DATABASE AnotherTestDB SET RECOVERY FULL;
GO

--Full database backup
BACKUP DATABASE AnotherTestDB TO DISK = 'c:BackupAnotherTestDB_Full.bak';
GO

RESTORE DATABASE [AnotherTestDB2] FROM  DISK = N'c:BackupAnotherTestDB_Full.bak' WITH RECOVERY,
      MOVE 'AnotherTestDB' TO
'C:AnotherTestDB2.mdf',
      MOVE 'AnotherTestDB_log'
TO 'C:AnotherTestDB2_log.ldf'
GO

--Do a Full database backup of the newly restored database
BACKUP DATABASE AnotherTestDB2 TO DISK = 'c:BackupAnotherTestDB2_Full.bak';
GO

--Perform a transaction log backup
BACKUP LOG AnotherTestDB2 TO  DISK = N'C:BackupAnotherTestDB2.trn';
GO
</pre>
<p>The generated LSNs actually meet our criterion for consecutive backups; see below:</p>
<pre class="brush: sql; title: ; notranslate">
--full database backup of original db
RESTORE HEADERONLY
   FROM DISK = N'C:BackupAnotherTestDB_Full.bak'
go
</pre>
<p>FirstLSN: 49000000006100037<br />
<span style="color:#ff0000;">LastLSN: 49000000007900001<br />
</span></p>
<pre class="brush: sql; title: ; notranslate">
--full database backup of restored db
RESTORE HEADERONLY
   FROM DISK = N'C:BackupAnotherTestDB2_Full.bak'
go
</pre>
<p>FirstLSN: 49000000009600043<br />
<span style="color:#ff0000;">LastLSN: 49000000011400001<br />
</span></p>
<pre class="brush: sql; title: ; notranslate">
--tlog backup of restored db
RESTORE HEADERONLY
   FROM DISK = N'C:BackupAnotherTestDB2.trn'
</pre>
<p>FirstLSN: <span style="color:#ff0000;">49000000007900001</span><br />
LastLSN: 49000000012000001</p>
<p>And yup, I was able to restore the transaction log backup using each of the full db backups as base.</p>
<p><strong>Imagine That!<br />
</strong>If this happens in real-life, say you lose the full db backup that starts a backup chain (maybe someone deleted it or it was moved to a different planet), there may actually be a slim chance that you have another copy lurking somewhere. Keyword I think though is <em>slim</em>. Thoughts?</p>
<p><em>And, no, I still think there are no stupid questions. </em> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janiceclee.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janiceclee.wordpress.com/511/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=511&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janiceclee.wordpress.com/2010/07/02/redo-full-db-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc9b3018ce55a4ae5ecb44d41f13a9ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Janice</media:title>
		</media:content>

		<media:content url="http://sqlmyway.files.wordpress.com/2010/07/db_info.jpg" medium="image">
			<media:title type="html">db_info</media:title>
		</media:content>
	</item>
		<item>
		<title>Transactions and oh yeah, that First Kiss…</title>
		<link>http://janiceclee.wordpress.com/2010/06/22/transactions-and-oh-yeah-that-first-kiss/</link>
		<comments>http://janiceclee.wordpress.com/2010/06/22/transactions-and-oh-yeah-that-first-kiss/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 16:30:44 +0000</pubDate>
		<dc:creator>janiceclee</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[SQL-ish]]></category>
		<category><![CDATA[sql server basics]]></category>

		<guid isPermaLink="false">http://janiceclee.com/?p=415</guid>
		<description><![CDATA[This is kinda a pain to read. I know, I re-read it before publishing. Well blame it on Tim Ford (blog &#124; twitter) and this challenge. Tim asked, what is a transaction? How do you explain it in a non-technical way? He said &#8220;non-technical&#8221;&#8230;he didn&#8217;t say &#8220;non-cheesy&#8221;. It ain&#8217;t easy being cheesy so humor me....<br /><a class="more-link" href="http://janiceclee.wordpress.com/2010/06/22/transactions-and-oh-yeah-that-first-kiss/">Continue reading &#187;</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=415&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><em>This is kinda a pain to read. I know, I re-read it before publishing. Well blame it on Tim Ford (<a target="_blank" href="http://thesqlagentman.com">blog</a> | <a target="_blank" href="http://twitter.com/sqlagentman">twitter</a>) and this <a target="_blank" href="http://thesqlagentman.com/2010/06/what-is-a-transaction/">challenge</a>. Tim asked, what is a transaction? How do you explain it in a non-technical way? He said &#8220;non-technical&#8221;&#8230;he didn&#8217;t say &#8220;non-cheesy&#8221;. It ain&#8217;t easy being cheesy so humor me.</em></p>
<p><strong>Oh that First Kiss</strong><br />
Yes, that darned first kiss. His name was Ricky, <del datetime="2010-06-22T13:53:47+00:00">the jerk</del>my first love. I knew it was eventually going to happen. I daydreamed about it, thought a lot about how to do it, asked my friends about it, and pretty much geeked (researched) my way  to it. With all the thinking and feeling I did prior to &#8220;the event&#8221;, the whole kissing thing already seemed and felt so real. But experiences like this cannot be &#8220;just&#8221; imagined&#8230;<strong>it&#8217;s atomic&#8230;all or nothing. It either happens or it doesnt</strong>. </p>
<p>When he asked me to close my eyes, I thought, OMG, am I really going to do this? And the moment I did, I had that momentous FIRST kiss with <del datetime="2010-06-22T13:53:47+00:00">that jerk</del> my first love. </p>
<p>Everything else faded. Even the voice inside my head (not mine but my mom&#8217;s) stopped talking. <strong>It was actually happening. Just the two of us. We both reveled in the isolation.</strong></p>
<p>And then it was over. That kiss changed me. I was in a <strong>consistent</strong> heaven state for a long time. It didn&#8217;t matter where I really was&#8230;in school, at home&#8211;I was in heaven.</p>
<p>Years have passed. Boyfriends have come and gone. There&#8217;ve been second, third, fourth and more kisses. But still, nothing beats that first kiss. There&#8217;s something about FIRSTs that just stays with us no matter what. Some <strong>durability</strong> that&#8217;s unique to all our FIRSTs. </p>
<p><strong>Okay, enough. I&#8217;m stopping.</strong><br />
Yeah, that was kinda a pain to read huh? Come on, humor me. Aren&#8217;t you tired too of all those debit-credit bank examples to illustrate transactions?? </p>
<p>So, how is this dorky kissing event even remotely related to what a transaction is? </p>
<p><strong>Transactions are atomic.</strong><br />
It&#8217;s all or nothing. It either commits or aborts. Just like that kiss. It doesn&#8217;t matter if I practiced with a pillow a thousand times (yeah, looking back, that was disgusting). Until the kiss actually happened, it really actually didn&#8217;t happen. The kissing plans could be rolled back; the actual kiss? No way.</p>
<p><strong>Transactions are isolated.</strong><br />
There could be a million other events going on while that kiss was happening. There could have been a guy wishing he was in Ricky&#8217;s place (oh-ho!) but nothing else could mess with that transaction&#8230;nobody else could take away that first. That transaction owned me!</p>
<p><strong>Transactions are consistent. </strong><br />
That kiss left me in heaven&#8211;and if that&#8217;s not a logical state to be in&#8211;I don&#8217;t know what is. A kiss that special wouldn&#8217;t have allowed me to be in an illogical state. Happy, yes. Illogical, no.</p>
<p><strong>Transactions are durable.</strong><br />
Even an earthquake couldn&#8217;t have stopped that kiss the moment it happened. In the past years, I&#8217;ve experienced a lot…but hey, the first kiss will always be <strong>the</strong> first kiss. I can&#8217;t destroy it nor recreate it. I can&#8217;t pretend that it didn&#8217;t happen because (thank God) it really did.</p>
<p><strong>Conclusion</strong><br />
No conclusion.  I&#8217;m already feeling so bad I wrote this.  It&#8217;s (r)ICKY and cheesy&#8230;but, hey, it&#8217;s non-technical!  And maybe, just maybe, I made it all up&#8230;:D</p>
<p><em>Ricky, please dont get ahead of yourself. I was really just forcing an analogy. And no, it wasn&#8217;t THAT good.</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janiceclee.wordpress.com/415/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janiceclee.wordpress.com/415/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janiceclee.wordpress.com&#038;blog=954965&#038;post=415&#038;subd=janiceclee&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janiceclee.wordpress.com/2010/06/22/transactions-and-oh-yeah-that-first-kiss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc9b3018ce55a4ae5ecb44d41f13a9ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Janice</media:title>
		</media:content>
	</item>
	</channel>
</rss>
