<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Allen Kinsel - SQL DBA &#187; Backup and Recovery</title>
	<atom:link href="http://www.allenkinsel.com/Topics/sql-server/backup-and-recovery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.allenkinsel.com</link>
	<description>SQL Server, PASS, and other data mishaps</description>
	<lastBuildDate>Mon, 07 Jan 2013 15:27:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<image>
  <link>http://www.allenkinsel.com</link>
  <url>http://www.allenkinsel.com/favicon.ico</url>
  <title>Allen Kinsel - SQL DBA</title>
</image>
		<item>
		<title>Invitation for T-SQL Tuesday #19 &#8211; Disasters &amp; Recovery</title>
		<link>http://www.allenkinsel.com/archive/2011/06/invitation-for-t-sql-tuesday-19-disasters-recovery/</link>
		<comments>http://www.allenkinsel.com/archive/2011/06/invitation-for-t-sql-tuesday-19-disasters-recovery/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 14:22:51 +0000</pubDate>
		<dc:creator>Allen Kinsel</dc:creator>
				<category><![CDATA[Backup and Recovery]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Syndicated]]></category>
		<category><![CDATA[TSQLTuesday]]></category>
		<category><![CDATA[Backups]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[tsql2sday]]></category>

		<guid isPermaLink="false">http://www.allenkinsel.com/?p=898</guid>
		<description><![CDATA[Disasters
Its the first week of June and for those of us living along the Gulf and Atlantic coasts of the US, that brings the beginning of hurricane season.  It also means its time for this months installment of T-SQL Tuesday.
This Months Topic
Disaster Recovery.  This topic is very near and dear to me based on the fact that]]></description>
			<content:encoded><![CDATA[<h1>Disasters<a href="http://www.allenkinsel.com/wp-content/uploads/2011/06/TSQL2sDay150x150.jpg"><img class="alignright size-full wp-image-900" title="TSQL2sDay150x150" src="http://www.allenkinsel.com/wp-content/uploads/2011/06/TSQL2sDay150x150.jpg" alt="" width="150" height="150" /></a></h1>
<p>Its the first week of June and for those of us living along the Gulf and Atlantic coasts of the US, that brings the beginning of <a href="http://en.wikipedia.org/wiki/2011_Atlantic_hurricane_season">hurricane season</a>.  It also means its time for this months installment of T-SQL Tuesday.</p>
<h2>This Months Topic</h2>
<div id="attachment_902" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.allenkinsel.com/wp-content/uploads/2011/06/IMG_0010.jpg"><img class="size-medium wp-image-902  " title="Hurricane Ike dead ahead" src="http://www.allenkinsel.com/wp-content/uploads/2011/06/IMG_0010-300x225.jpg" alt="Hurricane Ike dead ahead" width="300" height="225" /></a><p class="wp-caption-text">There goes your weekend/month</p></div>
<p>Disaster Recovery.  This topic is very near and dear to me based on the fact that I live on a barrier island that was the site to the <a href="http://en.wikipedia.org/wiki/1900_Galveston_hurricane">deadliest natural disaster</a> in US history and more recently destroyed by the <a href="http://en.wikipedia.org/wiki/Hurricane_Ike">third costliest hurricane </a>in history.  Needless to say preparing for disasters is nearly instinctive to me which might explain why I&#8217;m a DBA but I digress.  Anything you&#8217;d like to blog about related to preparing for or recovering from a disaster would be fair game, have a great tip you use to keep backups and recovers running smoothly, a horrific story of recovery gone wrong? or anything else related to keeping your systems online during calamity.  We want to hear it!</p>
<div id="attachment_906" class="wp-caption alignright" style="width: 235px"><a href="http://www.allenkinsel.com/wp-content/uploads/2011/06/IMG_0015.jpg"><img class="size-medium wp-image-906 " title="Ike Redux" src="http://www.allenkinsel.com/wp-content/uploads/2011/06/IMG_0015-225x300.jpg" alt="My street a month after Hurricane Ike" width="225" height="300" /></a><p class="wp-caption-text">My street a month after Hurricane Ike</p></div>
<h2>T-SQL Tuesday info</h2>
<p>Originally an idea <a href="http://sqlblog.com/blogs/adam_machanic/archive/2009/11/30/invitation-to-participate-in-t-sql-tuesday-001-date-time-tricks.aspx">dreamed </a>up by Adam Machanic (<a href="http://sqlblog.com/blogs/adam_machanic/">Blog</a>|<a href="http://twitter.com/adammachanic">Twitter</a>), it has become a monthly blog party where the host picks a topic and encourages anyone to write a post on that topic then a day or 3 later produces a roundup post of all the different perspectives from the community.</p>
<h2>Rules</h2>
<ul>
<li>Your post must be published between 00:00 GMT Tuesday June 14, 2011, and 00:00 GMT Wednesday June 15, 2011</li>
<li>Your post must contain the T-SQL Tuesday logo from above and the image should link back to this blog post.</li>
<li>Trackbacks should work, but if you don&#8217;t see one please link to your post in the comments section below so everyone can see your work</li>
</ul>
<h2>Nice to haves!</h2>
<ul>
<li>include a reference to T-SQL Tuesday in the title of your post</li>
<li>tweet about your post using the hash tag <a href="http://twitter.com/#!/search/%23tsql2sday">#TSQL2sDay</a></li>
<li>consider hosting T-SQL Tuesday yourself. Adam Machanic keeps the list, if he let me do it you&#8217;re bound to qualify!</li>
</ul>
<p>Check back in a few days to see the roundup post of all the great stories your peers shared</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allenkinsel.com/archive/2011/06/invitation-for-t-sql-tuesday-19-disasters-recovery/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>A tall tale of SQL database corruption</title>
		<link>http://www.allenkinsel.com/archive/2011/02/a-tall-tale-of-sql-database-corruption/</link>
		<comments>http://www.allenkinsel.com/archive/2011/02/a-tall-tale-of-sql-database-corruption/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 14:22:47 +0000</pubDate>
		<dc:creator>Allen Kinsel</dc:creator>
				<category><![CDATA[Backup and Recovery]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Syndicated]]></category>
		<category><![CDATA[Backups]]></category>
		<category><![CDATA[Recovery]]></category>

		<guid isPermaLink="false">http://www.allenkinsel.com/?p=642</guid>
		<description><![CDATA[This corruption story begins like many.  Somebody in a server room far far away decided to make a change to a VMware guest machine and that little change rippled through our poor server like a lady Gaga Meat Dress through the VMA’s.  Needless to say, it wasnt pretty.  The full set of events may never]]></description>
			<content:encoded><![CDATA[<p>This corruption story begins like many.  Somebody in a server room far far away decided to make a change to a VMware guest machine and that little change rippled through our poor server like a lady Gaga <a href="http://www.youtube.com/watch?v=CsLmRFOZFMQ" target="_blank">Meat Dress</a> through the VMA’s.  Needless to say, it wasnt pretty.  The full set of events may never be known by me but it appeared as though our guest server ran out of disk space on the OS and some form of recovery was done.<a href="http://www.flickr.com/photos/sharynmorrow/5961475/sizes/o/in/photostream/"><img class="alignright size-medium wp-image-649" title="Shattered into a million pieces" src="http://www.allenkinsel.com/wp-content/uploads/2011/01/lego-300x225.jpg" alt="Shattered into a million pieces" width="232" height="153" /></a></p>
<p>What we started with was a sql 2005 sp3 server where 1 of the drives was apparently corrupted, So 2 SQL instances wouldnt start.  They were both erroring with the message :</p>
<p>Error: 9003, Severity: 20, State: 1.<br />
The log scan number (23:5736:37) passed to log scan in database &#8216;master&#8217; is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.<br />
<br class="blank" /></p>
<p>Using trace flag 3608 and startup parameters -c -m I set about to do a normal &#8220;disaster&#8221; recovery of our server</p>
<p>After rebuilding the master database, everything came online successfully.  Then master was recovered from the previous backup.  Once master was online I started getting the very same error message about the model database</p>
<p>Error: 9003, Severity: 20, State: 1.</p>
<p>The LSN (11:999:1) passed to log scan in database &#8216;model&#8217; is invalid<br />
<br class="blank" /></p>
<p>This would prove to be a trying error!  it took about several iterations and quite a time to figure out exactly what was going on.<br />
<br class="blank" /></p>
<p>On this server after initial setup we had moved the system databases from the install drive to seperate drives for log and data.  When rebuilding master, the system db’s wind up back in the default directories but, after recovering master, the databases are pointed back to the original locations.</p>
<p>Once we got the server started the log scan error message for model showed up so, I began what I thought would be a normal restore of the model database.  Unfortunately, there was no way for model to be restored.  During the restore command, I got alternating messages that the model database log file was corrupted</p>
<p><br class="blank" /></p>
<p>Error: 3283, Severity: 16, State: 1.</p>
<p>The file &#8220;modellog&#8221; failed to initialize correctly. Examine the error logs for more detail</p>
<p>The Error 3283 Would be followed by</p>
<p>the database &#8216;model&#8217; is marked RESTORING and is in a state that does not allow recovery to be run.<br />
<br class="blank" /></p>
<p>After trying various iterations of deleting the existing model log &amp; database files, copying in the newly created ones and running restores, nothing was working.  I began to think the disks were actually having problems, or the backup was bad.  After verifying both the backup and the disk config I was left with only a hail mary –&gt; sp_detach_db</p>
<p>After detaching model, I copied in the newly created model files (from the rebuild of master) and ran sp_attach_db on them.  Once the Model database was attached the instance started successfully!</p>
<p>After the instance started model was restored from the same backup and the instance restarted.  Finally, once the instance came online, it was a standard restore of all the user databases.<br />
<br class="blank" /></p>
<p>Im not sure what about the logscan error in model caused the errors I saw, but, both instances behaved exactly the same.  I had to detach and reattach a blank model to make the other instance work as well.<br />
<br class="blank" /></p>
<p>After going through this, I went back and tried to reproduce the problems by intentionally corrupting model and its transaction log in various ways.  Every corruption I could cause in model behaved as I expected and a simple restore statement worked.  Im still not sure WHY this happened but, hopefully it wont happen again and if it does there wont be so much testing to figure out how to get model online</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allenkinsel.com/archive/2011/02/a-tall-tale-of-sql-database-corruption/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How do you do Disaster Recovery</title>
		<link>http://www.allenkinsel.com/archive/2010/01/how-do-you-do-disaster-recovery/</link>
		<comments>http://www.allenkinsel.com/archive/2010/01/how-do-you-do-disaster-recovery/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 13:45:14 +0000</pubDate>
		<dc:creator>Allen Kinsel</dc:creator>
				<category><![CDATA[Backup and Recovery]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Backups]]></category>
		<category><![CDATA[Disaster Recovery]]></category>

		<guid isPermaLink="false">http://www.allenkinsel.com/?p=134</guid>
		<description><![CDATA[Going through the process of a large scale multi-location disaster recovery made me stop and think about all the different incarnations that can be used to recover database servers. 
Living with a datacenter in Hurricane alley, We&#8217;ve been doing disaster preparedness(recovery) on a small scale for many years but this year we&#8217;ve been working towards recovering]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.allenkinsel.com/wp-content/uploads/2010/01/Ike.png"><img class="alignright size-medium wp-image-175" title="Hurricane Ike" src="http://www.allenkinsel.com/wp-content/uploads/2010/01/Ike-300x274.png" alt="" width="300" height="274" /></a>Going through the process of a large scale multi-location disaster recovery made me stop and think about all the different incarnations that can be used to recover database servers. </p>
<p>Living with a datacenter in <a href="http://en.wikipedia.org/wiki/Hurricane_Ike">Hurricane</a> alley, We&#8217;ve been doing disaster preparedness(recovery) on a small scale for many years but this year we&#8217;ve been working towards recovering all of our assets to an offsite colocation.  That part of the decision is easy, the actual method used to do these recoveries is definitely up in the air and I fully expect our processes to change for the better, every time we redo our disaster testing (many times a year going forward).</p>
<p>In exploring the recovery process we quickly realized that our &#8220;hardware failure&#8221; recovery documents weren&#8217;t going to work effectively in a datacenter failure situation.  So, it was time to design a new set of criteria for success.  I thought Id share our thought process and how we plan on tackling this always fun experience.  Its worth mentioning in a side note that no SQL replication is wanted/allowed for in our case.</p>
<p>1st thought:  Bring up blank OS builds for the database servers, load SQL Server, Patch it to the correct level while the tape restores of the database backups are happening, Recover the system databases then kick off the individual restores(that are scripted with the regular nightly backup jobs)</p>
<ul>
<li>Benefits to DBA: clean, repeatable, documentable process that we are mostly in control of.</li>
<li>Drawbacks: Time consuming, potential version match issues, recovering system databases is always &#8220;fun&#8221;</li>
</ul>
<p>2nd thought: Use a windows snapshot to restore the OS/Sql Binaries and Sql System databases then recover the user databases using the aforementioned scripts. This also buys us the nicety of having litespeed already installed</p>
<ul>
<li>Benefits to DBA: Faster, System level recovery done in a standard (for our system group) method</li>
<li>Drawbacks: system/SQL recovery out of our (DBA) control</li>
</ul>
<p>Since our Systems engineers are already asking to go the snap route (because thats common for other application servers), and we expect this method to take less overall time, we are planning on trying that first.  Depending on how that test goes, we will likely have option 1 as a backup plan or potentially try that next time thats why we&#8217;re testing it, so that we can make sure we have it right.</p>
<p>As always, there&#8217;s more than 1 way to accomplish the same outcome so my question is how do you do off-site disaster recovery (testing)?  Or maybe the better question is do you do disaster recovery testing?  If not why?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allenkinsel.com/archive/2010/01/how-do-you-do-disaster-recovery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
