<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www2.sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'backup'</title><link>http://www2.sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=backup&amp;orTags=0</link><description>Search results matching tag 'backup'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>The All-New 'Database Lifecycle Management&amp;quot; is available on MSDN</title><link>http://www2.sqlblog.com/blogs/kevin_kline/archive/2013/04/05/the-all-new-database-lifecycle-management-is-available-on-msdn.aspx</link><pubDate>Fri, 05 Apr 2013 10:51:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48547</guid><dc:creator>KKline</dc:creator><description>&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;The initial release of&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/library/jj907294.aspx"&gt;&lt;strong&gt;Database Lifecycle Management&lt;/strong&gt;&lt;/a&gt;&amp;nbsp;is now available on MSDN.&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;text-align:center;"&gt;&lt;a href="http://i.msdn.microsoft.com/dynimg/IC635547.gif"&gt;&lt;img class="aligncenter" alt="" width="811" height="627" style="border:0px;cursor:default;display:block;margin-left:auto;margin-right:auto;" src="http://i.msdn.microsoft.com/dynimg/IC635547.gif"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;The site is something called "curated content". This means it's a single consolidated location to look up lots of disparate articles and content, all in one easy to search location.&amp;nbsp;This “curated content view” contains the best content, video, and community-centric information from Microsoft, including topics like:&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;SQL Server Data Tools&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&amp;nbsp; &amp;nbsp;· Get started with sample projects, code samples&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&amp;nbsp; &amp;nbsp;· Video demos by Gert Drapers&amp;nbsp;(&lt;a href="http://blogs.msdn.com/b/gertd/"&gt;blog&lt;/a&gt;)&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&amp;nbsp; &amp;nbsp;· Script common data portability tasks using Sqlpackage.exe&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&amp;nbsp; &amp;nbsp;· Link to the SSDT team blog&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;SQL Server Management Studio&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&amp;nbsp; &amp;nbsp;· Manage SQL Database using SSMS&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&amp;nbsp; &amp;nbsp;· Backup and restore w/ SQL Azure&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&amp;nbsp; &amp;nbsp;· Migrate local databases to Azure&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&amp;nbsp; &amp;nbsp;· Video demo of hybrid scenarios by Gert Drapers (&lt;a href="http://blogs.msdn.com/b/gertd/"&gt;blog&lt;/a&gt;)&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;Windows Azure SQL Database&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&amp;nbsp; &amp;nbsp;· SQL Database backup and restore&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&amp;nbsp; &amp;nbsp;· Import/export SQL Database&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&amp;nbsp; &amp;nbsp;· Windows Azure training kit&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&amp;nbsp; &amp;nbsp;· Connection management and troubleshooting connections&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;Enjoy,&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;-Kevin&lt;/p&gt;&lt;p style="font-size:13.333333969116211px;line-height:18.99305534362793px;"&gt;&lt;a href="http://twitter.com/kekline"&gt;-Follow me on Twitter!&lt;/a&gt;&lt;br&gt;&lt;a href="https://plus.google.com/u/1/113032055249023350257?rel=author"&gt;- Google Author&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description></item><item><title>SQL Server 2008R2 / 2012 Standard &amp;amp; Backup Compression</title><link>http://www2.sqlblog.com/blogs/davide_mauri/archive/2013/03/25/sql-server-2008r2-2012-standard-backup-compression.aspx</link><pubDate>Mon, 25 Mar 2013 13:17:06 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48402</guid><dc:creator>manowar</dc:creator><description>&lt;p align="left"&gt;This is something that is totally overlooked, in my experience, with SQL Server 2008 R2 and SQL Server 2012. On the contrary to what happens with SQL Server 2008, &lt;strong&gt;the Standard version of SQL Server 2008R2 &amp;amp; SQL Server 2012 supports backup compression:&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="left"&gt;SQL Server 2008 R2 BOL      &lt;br /&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/cc645993(v=sql.105).aspx" href="http://msdn.microsoft.com/en-us/library/cc645993(v=sql.105).aspx"&gt;http://msdn.microsoft.com/en-us/library/cc645993(v=sql.105).aspx&lt;/a&gt;&lt;/p&gt; SQL Server 2012 BOL     &lt;br /&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/cc645993(v=sql.110).aspx" href="http://msdn.microsoft.com/en-us/library/cc645993(v=sql.110).aspx"&gt;http://msdn.microsoft.com/en-us/library/cc645993(v=sql.110).aspx&lt;/a&gt;&lt;/blockquote&gt;  &lt;p align="left"&gt;Unfortunately a bug in the documentation said the opposite in the past, but it has been fixed quite a long ago now:&lt;/p&gt;  &lt;p align="left"&gt;&lt;a title="http://social.msdn.microsoft.com/Forums/en-US/sqldocumentation/thread/b4f846e8-a339-422c-bb0b-91751e6c8560/" href="http://social.msdn.microsoft.com/Forums/en-US/sqldocumentation/thread/b4f846e8-a339-422c-bb0b-91751e6c8560/"&gt;http://social.msdn.microsoft.com/Forums/en-US/sqldocumentation/thread/b4f846e8-a339-422c-bb0b-91751e6c8560/&lt;/a&gt;&lt;/p&gt;  &lt;p align="left"&gt;Just keep it mind &lt;img class="wlEmoticon wlEmoticon-smile" style="border-top-style:none;border-left-style:none;border-bottom-style:none;border-right-style:none;" alt="Smile" src="http://sqlblog.com/blogs/davide_mauri/wlEmoticon-smile_79F83E82.png" /&gt;&lt;/p&gt;</description></item><item><title>SSMS 2012 Restore GUI Gotcha</title><link>http://www2.sqlblog.com/blogs/merrill_aldrich/archive/2013/03/15/ssms-2012-restore-gui-gotcha.aspx</link><pubDate>Fri, 15 Mar 2013 16:30:07 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48261</guid><dc:creator>merrillaldrich</dc:creator><description>&lt;p&gt;Today I want to bring to your attention an issue in the SQL Server Management Studio 2012 restore GUI. In many ways the new restore dialog is nicer than the old one, with new features and added convenience – but, as is always the Achilles heel of GUI tools like this, if you don’t know what’s really going on it can bite you. I’m not sure what to call this issue, maybe just a UI design flaw. Technically it works as designed, and there’s nothing really wrong with it, so it’s not a bug. But I can imagine it really causing someone pain who is careless or doesn’t know what’s happening behind the scenes.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Restoring a copy of a database make take the original down.&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Among the new features is some management of “Tail-Log Backups,” which is a wonderful idea. Taking a &lt;a href="http://msdn.microsoft.com/en-us/library/ms179314(v=sql.110).aspx"&gt;backup of the tail of the log&lt;/a&gt; will take down the database and put the whole end of the log into a backup file, preserving basically all modifications to the DB from the log. This is ideal, for example, at the last step of migrating a database using log shipping, because all the activity is preserved and the source database is locked against further modifications. The log chain is preserved in moving to the new copy of the database, or in a DR scenario, to your other server.&lt;/p&gt;  &lt;p&gt;The problem is, I know a lot of people don’t know this. Often its people who use the GUI a lot, such as “accidental DBAs.” I think the GUI is really important despite those who rarely use it, or frown on it.&lt;/p&gt;  &lt;p&gt;Here’s the issue: Suppose I have a production database that has some user-created problem (like a user accidentally updated some rows.) It may be reasonable to restore a copy of the database to a point before the issue and investigate whether it’s possible to merge the data back in. The original database isn’t damaged from a technical point of view – there’s no corruption, for example.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Right-click the original source database and choose &lt;strong&gt;Tasks &amp;gt; Restore &amp;gt; Database …&lt;/strong&gt; from the context menu.&lt;/li&gt;    &lt;li&gt;The resulting dialog will go out and discover the backup files for that database from MSDB, which is very helpful.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Change&lt;/strong&gt; the name of the target database, in order to restore it as a copy.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/merrill_aldrich/RestoreGUIIssueCap1_0C53DDEF.png"&gt;&lt;img title="RestoreGUIIssueCap1" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="RestoreGUIIssueCap1" src="http://sqlblog.com/blogs/merrill_aldrich/RestoreGUIIssueCap1_thumb_4BB1917F.png" width="644" height="313" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There’s a note at the top of the dialog that, while accurate, may not help some in this scenario. It says, “A tail-log backup of the source database will be taken.” Sounds innocuous if you don’t know what that implies. In past versions, restoring a copy of a database would never affect the original – or not by default, anyway – so I cringe as I imagine people merrily clicking past this warning.&lt;/p&gt;  &lt;p&gt;The script you get with these settings is indeed composed with a tail-log backup of the source database:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/merrill_aldrich/RestoreGUIIssueCap2_0B0F4510.png"&gt;&lt;img title="RestoreGUIIssueCap2" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="RestoreGUIIssueCap2" src="http://sqlblog.com/blogs/merrill_aldrich/RestoreGUIIssueCap2_thumb_4EE37967.png" width="698" height="174" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That will, as indicated, take a tail-log backup – and thereby take the original database down. Nice if you wanted that, but a mean surprise if you didn’t.&lt;/p&gt;  &lt;p&gt;If you act on the warning and click the Options tab, and then uncheck the offending setting, you do get the expected behavior (the original database is unaffected because the tail-log backup is not included at the top of the script):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/merrill_aldrich/RestoreGUIIssueCap3_357B762D.png"&gt;&lt;img title="RestoreGUIIssueCap3" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="RestoreGUIIssueCap3" src="http://sqlblog.com/blogs/merrill_aldrich/RestoreGUIIssueCap3_thumb_6E26203A.png" width="644" height="315" /&gt;&lt;/a&gt;&lt;/p&gt;          &lt;p&gt;So, be careful out there!&lt;/p&gt;</description></item><item><title>March Update to Rules-Driven Maintenance</title><link>http://www2.sqlblog.com/blogs/merrill_aldrich/archive/2013/03/11/march-update-to-rules-driven-maintenance.aspx</link><pubDate>Tue, 12 Mar 2013 02:56:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48191</guid><dc:creator>merrillaldrich</dc:creator><description>&lt;p&gt;This month I have a minor update to the Rules-Driven Maintenance code I originally &lt;a href="http://sqlblog.com/blogs/merrill_aldrich/archive/2012/08/01/rules-driven-maintenance.aspx"&gt;posted&lt;/a&gt; back in August 2012. This update has just two enhancements, but they are nice ones, I think:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Much improved handling for instances that use database snapshots.&lt;/li&gt;    &lt;li&gt;Ability to do intra-day differential backups purely by setting maintenance times and limits in the policy table.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The code posted here is cumulative, and replaces entirely the original code, but please refer back to &lt;a href="http://sqlblog.com/blogs/merrill_aldrich/archive/2012/08/01/rules-driven-maintenance.aspx"&gt;that original blog post&lt;/a&gt; for description, instructions and details. This update can be installed right over an existing deployment, or be installed all by itself as a complete solution but – as always – please test and be cautious.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;</description></item><item><title>Update to Rules-Driven Maintenance</title><link>http://www2.sqlblog.com/blogs/merrill_aldrich/archive/2013/01/16/update-to-rules-driven-maintenance.aspx</link><pubDate>Wed, 16 Jan 2013 18:34:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47183</guid><dc:creator>merrillaldrich</dc:creator><description>&lt;p&gt;Back in August I &lt;a href="http://sqlblog.com/blogs/merrill_aldrich/archive/2012/08/01/rules-driven-maintenance.aspx"&gt;posted&lt;/a&gt; a first version of a rules-driven solution for backups, index and statistics maintenance and integrity checks. The system in general has been working well, and has saved my team a huge amount of time and effort. We are coming to the anniversary of its use in production soon.&lt;/p&gt;  &lt;p&gt;Today I offer an update that contains a few enhancements, performance improvements and a bug fix.&lt;/p&gt;  &lt;p&gt;To recap, this is a system or framework to manage many small databases across many instances on many servers in a policy-based/automated way. The details about how to deploy and how to use the system are in the &lt;a href="http://sqlblog.com/blogs/merrill_aldrich/archive/2012/08/01/rules-driven-maintenance.aspx"&gt;original post&lt;/a&gt;, but at a high level:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;First deploy the code across a collection of servers using the included PowerShell script &lt;b&gt;DeployMaintenance.ps1&lt;/b&gt;. That will create an administrative database on every instance (or use one that you provide) and populate it with the required tables, procedures, etc. The deployment script will also make a handful of SQL Agent jobs that handle all the maintenance on all the databases.&lt;/li&gt;    &lt;li&gt;Visit the instances. If there is maintenance already in place, disable or remove it so as not to perform this work twice. If necessary, change or override the default preferences for this solution in the admin database for each type of maintenance. This includes the time of maintenance windows, whether to use features like differential backups or Litespeed, whether there are databases that should be treated as exceptions, with different settings, etc.&lt;/li&gt;    &lt;li&gt;Enable the new policy jobs in SQL Agent. &lt;/li&gt;    &lt;li&gt;Monitor to make sure things are running smoothly.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The theory behind this project is to save work configuring servers (efficiency), to ensure that the maintenance is in fact deployed and working for ALL databases in the environment (quality), to ensure that it works in a truly consistent way everywhere (consistency), and to make it so that the servers don’t have to be touched by a DBA when changes happen, such as adding or dropping databases (resiliency).&lt;/p&gt;  &lt;h4&gt;Changes&lt;/h4&gt;  &lt;p&gt;The updates in this 1.1 version include&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Better reporting of errors. The jobs now write log files to the default error log location for SQL Server.&lt;/li&gt;    &lt;li&gt;Better recovery from errors. The jobs in some cases continue on error – for example, one failed backup will not stop the backup job and leave other databases without backups.&lt;/li&gt;    &lt;li&gt;Performance enhancements for examining backup history and system counters (mainly % log used).&lt;/li&gt;    &lt;li&gt;One bug fix for the log backup logic on a server that uses both log shipping and Litespeed.&lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Disclaimers&lt;/h4&gt;  &lt;p&gt;The code for the system is posted here, and you are welcome to download it and try it out. Please note that this is not a commercial solution, and that while you may test or deploy this, you do so at your sole risk. Edits to the code almost certainly will be required for your environment. Please read, understand and test the code thoroughly before you even &lt;i&gt;imagine&lt;/i&gt; using this in production. I do not want to cause you or your employer any pain. License for using this solution is GPL 3.0: &lt;a href="http://opensource.org/licenses/GPL-3.0"&gt;http://opensource.org/licenses/GPL-3.0&lt;/a&gt;. You may use and modify this code, but not sell it.&lt;/p&gt;  &lt;p&gt;This has been run on SQL Server versions from 2005 to 2008 R2. It probably works on 2012, but I have not tested it thoroughly.&lt;/p&gt;  &lt;p&gt;I run only case-insensitive collation; if you are on a case-sensitive system, then you have my sympathy, and you might have to edit a few things to make this work.&lt;/p&gt;  &lt;p&gt;There is coverage for Quest Litespeed backups in the solution; other third-party backup products could be incorporated easily, but have not been. It should be possible to follow the pattern used to handle Litespeed and extend it to any other third-party stored procedures.&lt;/p&gt;  &lt;p&gt;If you haven’t done index maintenance for a while, and you flip this solution on &lt;b&gt;you might blow up your transaction log&lt;/b&gt;. Be sure that you have plenty of log space and plenty of log backup space, and watch the process the first few runs. This is especially true if the combination of &lt;b&gt;Standard Edition of SQL Server&lt;/b&gt; and the preference for &lt;b&gt;Online&lt;/b&gt; index maintenance applies in your environment, because the maintenance process will perform index maintenance using reorganize (defrag), which produces a lot of log.&lt;/p&gt;  &lt;p&gt;Lastly, this is &lt;b&gt;a solution for the type of environment that has many small databases&lt;/b&gt;, not the type with a few big, performance intensive databases. Databases that are large and require detailed attention may not be suitable for a one-size-fits-all solution like this.&lt;/p&gt;</description></item><item><title>Quick Tip - Speed a Slow Restore from the Transaction Log</title><link>http://www2.sqlblog.com/blogs/kevin_kline/archive/2012/11/14/quick-tip-speed-a-slow-restore-from-the-transaction-log.aspx</link><pubDate>Wed, 14 Nov 2012 15:59:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46209</guid><dc:creator>KKline</dc:creator><description>&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;Here's a quick tip for you:&lt;/p&gt;&lt;p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;During some restore operations on Microsoft SQL Server, the transaction log redo step might be taking an unusually long time. &amp;nbsp;Depending somewhat on the version and edition of SQL Server you've installed, you may be able to increase performance by tinkering with the readahead performance for the redo operations. &amp;nbsp;To do this, you should use the MAXTRANSFERSIZE parameter of the RESTORE statement. &amp;nbsp;For example, if you set MAXTRANSFERSIZE=1048576, it'll use 1MB buffers.&lt;/p&gt;&lt;div style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;div align="left"&gt;If you change the MAXTRANSFERSIZE, keep an eye on the PerfMon objects for Buffer Manager and Readahead IO. &amp;nbsp;You may also wish to keep an eye on LOGBUFFER wait stats.&lt;/div&gt;&lt;div align="left"&gt;&lt;br&gt;&lt;/div&gt;&lt;div align="left"&gt;I'd love to hear your feedback. &amp;nbsp;Have you tried this technique? &amp;nbsp;Did it work as advertised? &amp;nbsp;Did it require some changes to work on a specific version or edition?&lt;/div&gt;&lt;/div&gt;&lt;div align="left" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div align="left" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;Many thanks,&lt;/div&gt;&lt;div align="left" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div align="left" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;-Kev&lt;/div&gt;&lt;div align="left" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div align="left" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;-&lt;a title="Kevin E. Kline's Twitter Feed" href="http://twitter.com/kekline"&gt;Follow me on Twitter!&lt;/a&gt;&lt;/div&gt;</description></item><item><title>Backup File Naming Convention</title><link>http://www2.sqlblog.com/blogs/andrew_kelly/archive/2012/10/05/backup-file-naming-convention.aspx</link><pubDate>Fri, 05 Oct 2012 19:41:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:45458</guid><dc:creator>Andrew Kelly</dc:creator><description>  &lt;p&gt;I have been asked this many times before and again just recently so I figured why not blog about it. None of this information outlined here is rocket science or even new but it is an area that I don’t think people put enough thought into before implementing.&amp;nbsp; Sure everyone choses some format but it often doesn’t go far enough in my opinion to get the most bang for the buck. This is the format I prefer to use:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;ServerName_InstanceName_BackupType_DBName_DateTimeStamp_nn.xxx&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;ServerName_InstanceName&lt;/strong&gt; = Pretty self explanatory but lets look at it. Let’s say that the machine name is M432 and the instance is Dev2008. That would normally be W432\Dev2008 however I don’t like special characters so I change it to W432_Dev2008.&amp;nbsp; If it was a default instance it would be W432_W432. Some people (including myself) prefer to leave off the Server Name if it is a default instance but that is up to you. Since the default instance is always the name of the server it’s still pretty clear where it came from.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;BackupType&lt;/strong&gt; = FULL, DIFF or LOG.&amp;nbsp; Nothing more is needed here.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;DBName&lt;/strong&gt; = Full name of the database. One note here is that if the name has spaces I like to replace the space with some other valid character and some people prefer to remove the space altogether. Spaces in an object name is a whole debate in itself and I wont go there now &lt;img class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://sqlblog.com/blogs/andrew_kelly/wlEmoticon-smile_02A68058.png"&gt;.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;DateTimeStamp&lt;/strong&gt; = yyyymmddhhmmss. This allows me to know exactly when the backup started just by looking at the name and makes it unique as well. I don’t know any one who takes two backups of the same db in less than a second so this convention works to avoid file name conflicts.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;_nn&lt;/strong&gt; = The individual number associated with backing up to multiple files for a single backup operation. Typically backing up to multiple files for a FULL or DIFF backup can be more effecient with larger dbs so appending a number from 01 to nn ensures uniqueness as the rest of the name will be the same. If it is a single file then you can simply use 01 or omit that part altogether.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;.xxx&lt;/strong&gt; = I also like to use the extension to identify the tool used to create the backup file. For native SQL Server backups I use .bak regardless of the type of backup (Log, Diff or Full). For backups done using a 3rd party utility such as the one from Red-Gate I would use .sqb and so on.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This naming convention allows me to do several things. First it ensures each backup file will have a unique name. Second it allows me with a quick glance to see where the backup originated, what type of backup it is, which database it is for, when the backup started and which tool was used to create the backup.&amp;nbsp; So again there is nothing particularly new to this approach but I often see the naming falling short of this and generally only having the DB name and timestamp. Why not take the extra few steps to ensure you get the most out of your naming that you can. The code to generate the whole file name is pretty simple and can be done dynamically so why not go this route? OK there are always exceptions so let’s not start a debate war &lt;img class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://sqlblog.com/blogs/andrew_kelly/wlEmoticon-smile_02A68058.png"&gt;.&lt;/p&gt;  &lt;p&gt;Have fun,&lt;/p&gt;  &lt;p&gt;Andy&lt;/p&gt;</description></item><item><title>Real tortoises keep it slow and steady. How about the backups?</title><link>http://www2.sqlblog.com/blogs/maria_zakourdaev/archive/2012/09/10/real-tortoises-keep-it-slow-and-steady-how-about-the-backups.aspx</link><pubDate>Mon, 10 Sep 2012 10:54:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:45104</guid><dc:creator>Maria Zakourdaev</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;… Four tortoises were playing in the backyard when they decided they needed hibiscus flower snacks. They pooled their money and sent the smallest tortoise out to fetch the snacks. &lt;br&gt;Two days passed and there was no sign of the tortoise.    &lt;br&gt;"You know, she is taking a lot of time", said one of the tortoises.     &lt;br&gt;A little voice from just out side the fence said, "If you are going to talk that way about me I won't go."&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/maria_zakourdaev/image_2ACDB5DD.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" width="110" height="108" src="http://sqlblog.com/blogs/maria_zakourdaev/image_thumb_2DEEB651.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Is it too much to request from the quite expensive 3rd party backup tool to be a way faster than the SQL server native backup? &lt;/p&gt;  &lt;p&gt;Or at least save a respectable amount of storage by producing a really smaller backup files?&amp;nbsp; By saying “really smaller”, I mean at least getting a file in half size.&lt;/p&gt;  &lt;p&gt;After Googling the internet in an attempt to understand what other “sql people” are using for database backups, I see that most people are using one of three tools which are the main players in SQL backup area:&amp;nbsp; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font color="#0000ff"&gt;LiteSpeed by Quest&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font color="#0000ff"&gt;SQL Backup by Red Gate&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font color="#0000ff"&gt;SQL Safe by Idera&lt;/font&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The feedbacks about those tools are truly emotional and happy. However, while reading the forums and blogs I have wondered, is it possible that many are accustomed to using the above tools since SQL 2000 and 2005.&amp;nbsp; &lt;br&gt;This can easily be understood due to the fact that a 300GB database backup for instance, using regular a SQL 2005 backup statement would have run for about 3 hours and have produced ~150GB file (depending on the content, of course).&amp;nbsp; &lt;br&gt;Then you take a 3rd party tool which performs the same backup in 30 minutes resulting in a 30GB file leaving you speechless, you run to management persuading them to buy it due to the fact that it is definitely worth the price.     &lt;br&gt;In addition to the increased speed and disk space savings you would also get backup file encryption and virtual restore -&amp;nbsp; features that are still missing from the SQL server. &lt;/p&gt;  &lt;p&gt;But in case you, as well as me, don’t need these additional features and only want a tool that performs a full backup MUCH faster &lt;b&gt;AND &lt;/b&gt;produces a far smaller backup file (like the gain you observed back in SQL 2005 days) you will be quite disappointed. SQL Server backup compression feature has totally changed the market picture.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color="#009b00"&gt;Medium size database.&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;Take a look at the table below, check out how my SQL server 2008 R2 compares to other tools when backing up&lt;b&gt; &lt;/b&gt;a&lt;b&gt; &lt;font color="#0000ff"&gt;300GB&lt;/font&gt;&lt;/b&gt; database. &lt;/p&gt;  &lt;p&gt;It appears that when talking about the backup speed, &lt;u&gt;SQL 2008 R2 compresses and performs backup in similar overall times&lt;/u&gt; as all three other tools. 3rd party tools maximum compression level takes twice longer.     &lt;br&gt;Backup file gain is not that impressive, except the highest compression levels but the price that you pay is very high cpu load and much longer time. Only SQL Safe by Idera was quite fast with it’s maximum compression level but most of the run time have used 95% cpu on the server.     &lt;br&gt;Note that I have used two types of destination storage, SATA 11 disks and FC 53 disks and, obviously, on faster storage have got my backup ready in half time.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/maria_zakourdaev/image_3E86B13F.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" width="908" height="366" src="http://sqlblog.com/blogs/maria_zakourdaev/image_thumb_64102EA0.png"&gt;&lt;/a&gt; &lt;a href="http://sqlblog.com/blogs/maria_zakourdaev/image_3B251997.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" width="911" height="44" src="http://sqlblog.com/blogs/maria_zakourdaev/image_thumb_332D7735.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Looking at the above results, should we spend money, bother with another layer of complexity and software middle-man for the medium sized databases? I’m definitely not going to do so.&amp;nbsp; &lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;font color="#009b00"&gt;Very large database&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;As a next phase of this benchmark, I have moved to a &lt;b&gt;&lt;font color="#0000ff"&gt;6 terabyte&lt;/font&gt;&lt;/b&gt; database which was actually my main backup target.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/maria_zakourdaev/image_2AC9A1DE.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" width="791" height="266" src="http://sqlblog.com/blogs/maria_zakourdaev/image_thumb_6544A1B2.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Note, how &lt;u&gt;multiple files usage enables the SQL Server backup operation to use parallel I/O and remarkably increases it’s speed, &lt;/u&gt;especially when the backup device is heavily striped. SQL Server supports a maximum of 64 backup devices for a single backup operation but the most speed is gained when using one file per CPU, in the case above 8 files for a 2 Quad CPU server. The impact of additional files is minimal.&amp;nbsp; &lt;br&gt;However, SQLsafe doesn’t show any speed improvement between 4 files and 8 files.&lt;/p&gt;  &lt;p&gt;Of course, with such huge databases every half percent of the compression transforms into the noticeable numbers. Saving almost 470GB of space may turn the backup tool into quite valuable purchase. Still, the backup speed and high CPU are the variables that should be taken into the consideration.&lt;/p&gt;  &lt;p&gt;As for us, the backup speed is more critical than the storage and we cannot allow a production server to sustain 95% cpu for such a long time.    &lt;br&gt;&lt;b&gt;&lt;u&gt;Bottomline, 3rd party backup tool developers, we are waiting for some breakthrough release.&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;There are a few unanswered questions, like the restore speed comparison between different tools and the impact of multiple backup files on restore operation. Stay tuned for the next benchmarks.&amp;nbsp; &lt;br&gt;&amp;nbsp;&lt;img width="134" height="101" src="http://embed.polyvoreimg.com/cgi/img-thing/size/y/tid/52397248.jpg"&gt;&lt;/p&gt;  &lt;p&gt;Benchmark server:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;SQL Server 2008 R2 sp1 &lt;/li&gt;    &lt;li&gt;2 Quad CPU &lt;/li&gt;    &lt;li&gt;Database location: NetApp FC 15K Aggregate 53 discs &lt;/li&gt;&lt;li&gt;Backup destination volumes: two physical NetApps&amp;nbsp;FC 15K Aggregate 53 discs, 4 files on each volume.&amp;nbsp;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Backup statements:&lt;/p&gt;  &lt;p&gt;No matter how good that UI is, we need to run the backup tasks from inside of SQL Server Agent to make sure they are covered by our monitoring systems. I have used extended stored procedures (command line execution also is an option, I haven’t noticed any impact on the backup performance). &lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p align="center"&gt;&lt;b&gt;SQL backup&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p align="center"&gt;&lt;b&gt;LiteSpeed&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p align="center"&gt;&lt;b&gt;SQL Backup&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p align="center"&gt;&lt;b&gt;SQL safe&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font size="1"&gt;&lt;font color="#0000ff"&gt;backup database &lt;/font&gt;&amp;lt;DBNAME&amp;gt; &lt;font color="#0000ff"&gt;to &lt;/font&gt;&lt;/font&gt;            &lt;br&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;&lt;font color="#0000ff"&gt;disk&lt;/font&gt;&lt;/font&gt;= &lt;font color="#ff0000"&gt;'&lt;/font&gt;&lt;font size="1"&gt;&lt;font color="#ff0000"&gt;\\&amp;lt;networkpath&amp;gt;\par1.bak'&lt;/font&gt; &lt;/font&gt;,             &lt;br&gt;            &lt;br&gt;&lt;font size="1"&gt;&lt;font color="#0000ff"&gt;disk&lt;/font&gt;= '&lt;font color="#ff0000"&gt;\\&amp;lt;networkpath&amp;gt;\par2.bak'&lt;/font&gt;,&lt;/font&gt;             &lt;br&gt;            &lt;br&gt;&lt;font size="1"&gt;&lt;font color="#0000ff"&gt;disk&lt;/font&gt;= &lt;font color="#ff0000"&gt;'\\&amp;lt;networkpath&amp;gt;\par3.bak'&lt;/font&gt; &lt;/font&gt;            &lt;br&gt;            &lt;br&gt;&lt;font color="#0000ff"&gt;&lt;/font&gt;            &lt;br&gt;&lt;font color="#0000ff" size="1"&gt;with format, compression&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font size="1"&gt;&lt;font color="#0000ff"&gt;EXECUTE&lt;/font&gt; master.dbo.xp_backup_database&lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@database =&lt;font color="#ff0000"&gt; N'&amp;lt;DBName&amp;gt;'&lt;/font&gt;, &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@backupname= &lt;font color="#ff0000"&gt;N'&amp;lt;DBName&amp;gt; full backup'&lt;/font&gt;, &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@desc = &lt;font color="#ff0000"&gt;N'Test'&lt;/font&gt;, &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@compressionlevel=8, &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@filename= &lt;font color="#ff0000"&gt;N'\\&amp;lt;networkpath&amp;gt;\par1.bak'&lt;/font&gt;, &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@filename= &lt;font color="#ff0000"&gt;N'\\&amp;lt;networkpath&amp;gt;\par2.bak'&lt;/font&gt;, &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@filename= &lt;font color="#ff0000"&gt;N'\\&amp;lt;networkpath&amp;gt;\par3.bak'&lt;/font&gt;,               &lt;br&gt;@init = 1&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font size="1"&gt;&lt;font color="#0000ff"&gt;EXECUTE&lt;/font&gt; master.dbo.sqlbackup               &lt;br&gt;&lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;'-SQL "BACKUP DATABASE &amp;lt;DBNAME&amp;gt; &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font color="#ff0000" size="1"&gt;TO DISK= ''\\&amp;lt;networkpath&amp;gt;\par1.sqb'', &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font color="#ff0000" size="1"&gt;DISK= ''\\&amp;lt;networkpath&amp;gt;\par2.sqb'', &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font color="#ff0000" size="1"&gt;DISK= ''\\&amp;lt;networkpath&amp;gt;\par3.sqb'' &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font color="#ff0000" size="1"&gt;WITH &lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font color="#ff0000" size="1"&gt;DISKRETRYINTERVAL = 30,              &lt;br&gt;DISKRETRYCOUNT = 10,               &lt;br&gt;COMPRESSION = 4,               &lt;br&gt;INIT"' &lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font size="1"&gt;&lt;font color="#0000ff"&gt;EXECUTE&lt;/font&gt; &lt;/font&gt;&lt;font size="1"&gt;master.dbo.&lt;/font&gt;&lt;a href="mailto:master.dbo.xp_ss_backup@database"&gt;&lt;font size="1"&gt;xp_ss_backup&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@database = &lt;font color="#ff0000"&gt;'UCMSDB'&lt;/font&gt;,&lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@filename = &lt;font color="#ff0000"&gt;'\\&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;&amp;lt;networkpath&amp;gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font color="#ff0000"&gt;\par1.bak'&lt;/font&gt;,&lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@backuptype = &lt;font color="#ff0000"&gt;'Full'&lt;/font&gt;,&lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@compressionlevel = 4,&lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@backupfile = '&lt;font color="#ff0000"&gt;\\&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;&amp;lt;networkpath&amp;gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font color="#ff0000"&gt;\par2.bak'&lt;/font&gt;,&lt;/font&gt;&lt;/p&gt;          &lt;p&gt;&lt;font size="1"&gt;@backupfile =&lt;font color="#ff0000"&gt; '\\&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt;&lt;font size="1"&gt;&amp;lt;networkpath&amp;gt;&lt;/font&gt;&lt;font size="1"&gt;\par3.bak'&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;If you still insist on using 3rd party tools for the backups in your production environment with maximum compression level, you will definitely need to consider limiting cpu usage which will increase the backup operation time even more: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;RedGate&lt;/b&gt; : use THREADPRIORITY option ( values 0 – 6 ) &lt;/li&gt;    &lt;li&gt;&lt;b&gt;LiteSpeed&lt;/b&gt; : use&amp;nbsp; @throttle ( percentage, like 70%) &lt;/li&gt;    &lt;li&gt;&lt;b&gt;SQL safe&lt;/b&gt; :&amp;nbsp; the only thing I have found was @Threads option. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;Yours,&lt;/p&gt;  &lt;p&gt;Maria&lt;/p&gt;</description></item><item><title>High-Availability White Papers and Resources for SQL Server</title><link>http://www2.sqlblog.com/blogs/kevin_kline/archive/2012/07/26/high-availability-white-papers-and-resources-for-sql-server.aspx</link><pubDate>Thu, 26 Jul 2012 15:00:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:44457</guid><dc:creator>KKline</dc:creator><description>&lt;div class="mceTemp" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;div class="mceTemp"&gt;&lt;a rel="attachment wp-att-2011" href="http://kevinekline.com/2012/07/26/high-availability-white-papers-and-resources-for-sql-server/charlotte-sql-ug/"&gt;&lt;img class="size-medium wp-image-2011" title="Charlotte SQL UG" alt="" width="300" height="168" style="border:0px none;cursor:default;margin:0px;padding:0px;-webkit-user-drag:none;" src="http://kevinekline.com/wp-content/uploads/2012/07/Charlotte-SQL-UG-300x168.jpg"&gt;&lt;/a&gt;In foreground, attendee makes dreaded "shoot myself" hand sign to the speaker.&lt;/div&gt;&lt;p&gt;I was just telling the good people of Charlotte about how they (and how YOU) need to read all things by Paul Randal (&lt;a title="Paul Randal's Blog" href="http://www.sqlskills.com/BLOGS/paul/"&gt;blog&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a title="Paul Randal's Twitter Feed" href="http://twitter.com/paulrandal"&gt;twitter&lt;/a&gt;), except for all of his&amp;nbsp;&lt;a title="Maybe He Did Write a Romance Novel, Maybe He Didn't" href="http://www.amazon.com/forum/romance?cdForum=FxM42D5QN2YZ1D&amp;amp;cdThread=Tx2769ZA6OCU1BD"&gt;cheesy romance novels&lt;/a&gt;&amp;nbsp;like&amp;nbsp;&lt;a title="Quite Possibly The Worst Romance Novel EVER" href="http://www.amazon.com/Caress-and-Conquer-ebook/dp/B006IUV50A/ref=sr_1_2?ie=UTF8&amp;amp;qid=1343317555&amp;amp;sr=8-2&amp;amp;keywords=Caress+and+Conquer+by+Connie+Mason"&gt;&lt;em&gt;Caress and Conquer&lt;/em&gt;&lt;/a&gt;&amp;nbsp;written under the nom de plum of Connie Mason.&lt;/p&gt;&lt;p&gt;There's lots more good stuff from Paul, just not romantic.&lt;/p&gt;&lt;p&gt;This is a 'so-last-version' whitepaper describing &amp;nbsp;five common high-availability and disaster-recovery architectures deployed by customers, along with a case study of each. Although the white paper is specific to SQL Server 2008 R2 and isn't updated for AlwaysOn features, it's still really, really good. &amp;nbsp;It covers:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Failover Clustering for High Availability with Database Mirroring for Disaster Recovery&lt;/li&gt;&lt;li&gt;Database Mirroring for High Availability and Disaster Recovery&lt;/li&gt;&lt;li&gt;Geo-Clustering for High Availability and Disaster Recovery&lt;/li&gt;&lt;li&gt;Failover Clustering for High Availability Combined with SAN-Based Replication for Disaster Recovery&lt;/li&gt;&lt;li&gt;Peer-to-Peer Replication for High Availability and Disaster Recovery&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;You can get it from&amp;nbsp;&lt;a href="http://download.microsoft.com/download/5/B/D/5BD13FFA-5E34-4AE1-9AA0-C6E6951B8FC8/SQL%20Server%202008%20R2%20High%20Availability%20Architecture%20White%20Paper.docx"&gt;this link&lt;/a&gt;. &amp;nbsp;Not everything is transferable to new AlwaysOn technologies, but then again AlwaysOn is an Enterprise Edition feature. &amp;nbsp;So the database mirroring recommendation can be upsized, in many if not all cases, to SQL Server 2012, while the SAN and peer-to-peer recommendations continue to hold fast.&lt;/p&gt;&lt;p&gt;In addition, I encourage you to get up to speed on AlwaysOn. &amp;nbsp;There are two great AlwaysOn FAQs that I recommend.&amp;nbsp; The first is Microsoft’s official AlwaysOn FAQ at&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/sqlserver/gg508768.aspx"&gt;http://msdn.microsoft.com/en-us/sqlserver/gg508768.aspx&lt;/a&gt;.&amp;nbsp; The second comes from my buddy and high-availability expert Allan Hirt (&lt;a title="Allan Hirt, Mr. SQLHA" href="http://www.sqlha.com/"&gt;blog&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a title="Allan Hirt's Twitter Feed" href="http://twitter.com/sqlha"&gt;twitter&lt;/a&gt;) at&amp;nbsp;&lt;a href="http://www.sqlha.com/2012/04/13/allans-alwayson-availability-groups-faq/"&gt;http://www.sqlha.com/2012/04/13/allans-alwayson-availability-groups-faq/&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;To get started with AlwaysOn, check out&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/library/cc645581.aspx"&gt;http://msdn.microsoft.com/en-us/library/cc645581.aspx&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Enjoy,&lt;/p&gt;&lt;p&gt;-Kev&lt;/p&gt;&lt;/div&gt;</description></item><item><title>Backup and the evil RETAINDAYS option</title><link>http://www2.sqlblog.com/blogs/tibor_karaszi/archive/2012/07/08/backup-and-the-evil-retaindays-option.aspx</link><pubDate>Sun, 08 Jul 2012 12:25:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:44226</guid><dc:creator>TiborKaraszi</dc:creator><description>&lt;p&gt;"So what bad has this option done?", you probably as yourself. Well, not much, but I find it evil because it confuses people, especially those new to SQL Server. I have many times seen people specifying something like 3, and expect SQL Server to keep the three most recent backups in the backup file and overwrite everything which is older than that. Well, that is &lt;strong&gt;not&lt;/strong&gt; what the option does. &lt;/p&gt;
&lt;p&gt;But before we go into details, let's look at an example backup command which is using this option:&lt;/p&gt;&lt;p&gt;

&lt;code style="font-size:12px;"&gt;&lt;span style="color:blue;"&gt;BACKUP DATABASE &lt;/span&gt;&lt;span style="color:black;"&gt;sqlmaint &lt;/span&gt;&lt;span style="color:blue;"&gt;TO DISK = &lt;/span&gt;&lt;span style="color:red;"&gt;'R:\sqlmaint.bak' &lt;/span&gt;&lt;span style="color:blue;"&gt;WITH &lt;/span&gt;&lt;span style="color:black;"&gt;RETAINDAYS &lt;/span&gt;&lt;span style="color:blue;"&gt;= &lt;/span&gt;&lt;span style="color:black;"&gt;3&lt;/span&gt;&lt;/code&gt;
&lt;/p&gt;&lt;p&gt;The RETAINDAYS is also exposed in the backup dialog in SSMS: "&lt;em&gt;Backup set will expire: After x days&lt;/em&gt;".&lt;/p&gt;&lt;p&gt;It is also exposed in Maintenance Plans, the backup task. The option is named "&lt;em&gt;Backup set will expire: After x days&lt;/em&gt;". It is only enabled if you select the "&lt;em&gt;Back up databases across one or more files&lt;/em&gt;" option, which is not the default option. This makes sense.&lt;br&gt;The default option is "&lt;em&gt;Create a backup files for every database&lt;/em&gt;", which means that every time a backup is performed, a new file is created consisting of&amp;nbsp;the database name, date and time. Since we will see that this option is only relevant when we do append, it makes sense in the RETAINDAYS not being enabled for this choice.&lt;/p&gt;&lt;p&gt;So what does this option do? All it does is make SQL Server&amp;nbsp;return an error message of you try to do a backup using the INIT option (which means overwrite) before the date and time has occurred. In other words, it tries to help you in not overwriting a backup file, using the INIT option, before it is time. You can still overwrite&amp;nbsp;earlier by either using the stronger FORMAT option instead of INIT; or by simply deleting the backup file. Btw, the RETAINDAYS parameter has a cousin named EXPIREDATE, which does the same thing but you specify a datetime value instead of number of days.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Backup generations&lt;br&gt;&lt;/strong&gt;So, we have seen that RETAINDAYS do not in any way provide any automatic backup generation handling. There is no such functionality built-in in the BACKUP command. This means that when you are looking for functionality such as "keep backup files three days, and remove older than that", you need to look outside the BACKUP command. I.e., some script or tool of some sort. &lt;/p&gt;&lt;p&gt;I have an example (without the "delete old files" part) &lt;a href="http://www.karaszi.com/SQLServer/util_backup_script_like_MP.asp"&gt;here&lt;/a&gt;, which I mostly created as a starting point for those who want to roll their own and want to have some example to start with. Many of you are probably using Maintenance plans (the "Create a backup files for every database" option in the backup task, along with Maintenance Cleanup task). Another popular script/tool for this is Ola Hallengren's Maintenance Solution, which you find at &lt;a href="http://ola.hallengren.com/"&gt;http://ola.hallengren.com/&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>