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

<channel>
	<title> &#187; Recovery Mode</title>
	<atom:link href="http://benchmarkitconsulting.com/tag/recovery-mode/feed/" rel="self" type="application/rss+xml" />
	<link>http://benchmarkitconsulting.com</link>
	<description></description>
	<lastBuildDate>Mon, 06 Feb 2012 16:34:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>I am not the first DBA to take up this cause&#8230; but I am determined to be the last</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2009/09/10/i-am-not-the-first-dba-to-take-up-this-cause-but-i-am-determined-to-be-the-last/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2009/09/10/i-am-not-the-first-dba-to-take-up-this-cause-but-i-am-determined-to-be-the-last/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 16:47:11 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Recovery]]></category>
		<category><![CDATA[Recovery Mode]]></category>
		<category><![CDATA[Transaction Log]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=1041</guid>
		<description><![CDATA[OK maybe this article is not THAT important LOL but it was a great quote by Obama so I figured I&#8217;d work it in LOL Please know what Recovery Mode your databases are in and your recovery requirements and then back them up accordingly. Too often I see databases that are in a Full or [...]]]></description>
			<content:encoded><![CDATA[<p>OK maybe this article is not THAT important LOL but it was a great quote by Obama so I figured I&#8217;d work it in LOL <img src='http://benchmarkitconsulting.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Please know what Recovery Mode your databases are in and your recovery requirements and then back them up accordingly.</p>
<p>Too often I see databases that are in a Full or Bulk Logged recovery mode but do not have transaction log backups running.  If you&#8217;re not performing transaction log backups there really is no good reason to be in a Full or Bulk Logged Recovery Mode.</p>
<p>Below is a script that you can run against a single instance or if you use a Central Management Server ( See <a href="http://www.brentozar.com/archive/2008/08/sql-server-2008s-new-central-management-server/" target="_blank">Brent Ozar&#8217;s post on CMS</a>) that you can use as a starting point to provide information on your databases, what recovery mode then are in, and their most recent Full, Differential, and Transaction Log Backup Date/Time.  I&#8217;ve also included the databases &#8220;Updateability&#8221; and &#8220;UserAccess&#8221; as these settings would play a role in your backup strategy.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="t-sql" style="font-family:monospace;">SELECT 	A.dbid, A.name as [DatabaseName], 
		CONVERT(sysname,DATABASEPROPERTYEX(A.name, 'Recovery')) AS [RecoveryMode],
		(	SELECT	max(backup_finish_date) 
			FROM	msdb.dbo.backupset 
			WHERE	[type] = 'D' and 
					database_name = A.name) AS [LastFullBackupDateTime],
		(	SELECT	max(backup_finish_date) 
			FROM	msdb.dbo.backupset 
			WHERE	[type] = 'I' and 
					database_name = A.name) AS [LastDiffBackupDateTime],
		(	SELECT	max(backup_finish_date) 
			FROM	msdb.dbo.backupset 
			WHERE	[type] = 'L' and 
					database_name = A.name) AS [LastLogBackupDateTime],
		CONVERT(sysname,DATABASEPROPERTYEX(A.name, 'Updateability')) Updateability,
		CONVERT(sysname,DATABASEPROPERTYEX(A.name, 'UserAccess')) UserAccess
FROM 	master.dbo.sysdatabases A WITH(NOLOCK)
WHERE 	A.name NOT IN ('tempdb')
GROUP BY A.dbid, A.name
ORDER BY A.name</pre></td></tr></table></div>

<p>Policy Based Management is also a great way to alert you on databases that do not have an appropriate backup configuration but if you&#8217;re not quite &#8220;there&#8221; yet this is a good place to start until you bridge that gap.</p>
<p><strong> </strong><br />
Here is a quick description of each Recovery Mode&#8217;s backup capabilities:</p>
<p><strong>Simple Recovery Mode</strong></p>
<ul>
<li>Full Backups &#8211; Yes</li>
<li>Differential Backups &#8211; Yes</li>
<li>Transaction Log Backups are NOT available because transactions are truncated from the transaction log usually after each checkpoint</li>
</ul>
<p><strong>Bulk-Logged Recovery Mode</strong></p>
<ul>
<li>Full Backups &#8211; Yes</li>
<li>Differential Backups &#8211; Yes</li>
<li>Transaction Log Backups &#8211; Yes (but Bulk Operations like BCP, Bulk Insert, etc are minimally logged)</li>
</ul>
<p><strong>Full Recovery Mode</strong></p>
<ul>
<li>Full Backups &#8211; Yes</li>
<li>Differential Backups &#8211; Yes</li>
<li>Transaction Log Backups &#8211; Yes</li>
</ul>
<p> </p>
<p>Enjoy!!</p>
<p><span><a href="http://benchmarkitconsulting.com" target="_blank"><img class="alignnone size-full wp-image-402" title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a><a href="http://sqlserverpedia.com/wiki/Editors#Colin_Stasiuk" target="_blank"><img src="http://sqlserverpedia.com/badges/SQLServerPedia_Badge_Blogger.jpg" alt="" width="120" height="60" /> </a></span></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=I+am+not+the+first+DBA+to+take+up+this+cause%26%238230%3B+but+I+am+determined+to+be+the+last+http://tinyurl.com/m7r8up" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2009/09/10/i-am-not-the-first-dba-to-take-up-this-cause-but-i-am-determined-to-be-the-last/&amp;title=I+am+not+the+first+DBA+to+take+up+this+cause%26%238230%3B+but+I+am+determined+to+be+the+last" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2009/09/10/i-am-not-the-first-dba-to-take-up-this-cause-but-i-am-determined-to-be-the-last/&amp;title=I+am+not+the+first+DBA+to+take+up+this+cause%26%238230%3B+but+I+am+determined+to+be+the+last" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2009/09/10/i-am-not-the-first-dba-to-take-up-this-cause-but-i-am-determined-to-be-the-last/&amp;title=I+am+not+the+first+DBA+to+take+up+this+cause%26%238230%3B+but+I+am+determined+to+be+the+last" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2009/09/10/i-am-not-the-first-dba-to-take-up-this-cause-but-i-am-determined-to-be-the-last/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SQL 2000 Replication&#8230; changing Recovery Mode</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2009/06/11/sql-2000-replication-changing-recovery-mode/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2009/06/11/sql-2000-replication-changing-recovery-mode/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 15:22:59 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Change]]></category>
		<category><![CDATA[Changing]]></category>
		<category><![CDATA[Full]]></category>
		<category><![CDATA[Recovery]]></category>
		<category><![CDATA[Recovery Mode]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[Simple]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL 2000]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=747</guid>
		<description><![CDATA[Short Answer: YES It had been a while since I worked with SQL 2000 Replication so I was fairly confident that you could but wasn&#8217;t willing to just go and do it without a proper test first. I took at copy of the database that I was looking to do this on and built myself [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-752" title="sql200repl2" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/06/sql200repl2.jpg" alt="sql200repl2" width="405" height="268" /></p>
<p>Short Answer: YES</p>
<p>It had been a while since I worked with SQL 2000 Replication so I was fairly confident that you could but wasn&#8217;t willing to just go and do it without a proper test first.</p>
<p>I took at copy of the database that I was looking to do this on and built myself a little test enivornment.  I made sure my database was in full recovery mode&#8230; setup a transactional replication publication, distributor, and subscriber identical to the environment I&#8217;m wanting to do this on.  I inserted, updated, and deleted some rows just to make sure everything was tickity-boo before doing my test.</p>
<p>I altered the publisher database and set the recovery mode to Simple without doing anything special to replication&#8230; I did more inserts, updates, and deletes and everything flowed through smoothly.  I switch it back to Full Recovery Mode and lather, rinse, repeat and everything still worked fine.</p>
<p>When I <a href="http://www.bing.com/" target="_blank">Binged</a> the question I didn&#8217;t get many (or any) hits that applied.  One link I went to (totally unrelated) was very scary/interesting&#8230; A user asked about using Simple Recovery Mode and whether Replication will work or not&#8230; someone told them that you can&#8217;t use simple recovery mode cause transactional replication depends on the transaction log and that a checkpoint will flush everything out (replicated or not) and cause replication to fail. </p>
<p><img class="alignnone size-full wp-image-801" title="fdjhfdfd" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/06/fdjhfdfd.jpg" alt="fdjhfdfd" width="461" height="404" /></p>
<p>*sigh* another example of why you don&#8217;t want to take everything you read at face value without investigating on your own.  Some answers are just clearly wrong (like the one above)&#8230; while others are kind of right depending on the situation and need.  My replication test I just performed worked successfully for me but just for arguements sake what if there was a publication setting somewhere that would invalidate your publication and force you into a reinitializing your subscribers?</p>
<p>I guess the moral of the story is something that has been commented on by many people in the community.  The internet is a great resource for finding information and answers but at the end of the day it&#8217;s up to YOU to test and ensure that the information and answers you get are right for you and your environment.</p>
<p>Enjoy!!!</p>
<p><span><a href="http://benchmarkitconsulting.com" target="_blank"><img class="alignnone size-full wp-image-402" title="benchmark_sm" src="http://benchmarkitconsulting.com/wp-content/uploads/2009/02/benchmark_sm.jpg" alt="" width="157" height="74" /></a><a href="http://sqlserverpedia.com/wiki/Editors#Colin_Stasiuk" target="_blank"><img src="http://sqlserverpedia.com/badges/SQLServerPedia_Badge_Blogger.jpg" alt="" width="120" height="60" /> </a></span></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=SQL+2000+Replication%26%238230%3B+changing+Recovery+Mode+http://tinyurl.com/lh75ks" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2009/06/11/sql-2000-replication-changing-recovery-mode/&amp;title=SQL+2000+Replication%26%238230%3B+changing+Recovery+Mode" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2009/06/11/sql-2000-replication-changing-recovery-mode/&amp;title=SQL+2000+Replication%26%238230%3B+changing+Recovery+Mode" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2009/06/11/sql-2000-replication-changing-recovery-mode/&amp;title=SQL+2000+Replication%26%238230%3B+changing+Recovery+Mode" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2009/06/11/sql-2000-replication-changing-recovery-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

