<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://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 tags 'Backup' and 'Tools'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=Backup,Tools&amp;orTags=0</link><description>Search results matching tags 'Backup' and 'Tools'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Update to Rules-Driven Maintenance</title><link>http://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>Backup and the evil RETAINDAYS option</title><link>http://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><item><title>Rebuild master in SQL Server 2008</title><link>http://sqlblog.com/blogs/tibor_karaszi/archive/2008/08/29/rebuild-master-in-sql-server-2008.aspx</link><pubDate>Fri, 29 Aug 2008 18:18:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:8655</guid><dc:creator>TiborKaraszi</dc:creator><description>&lt;P&gt;You might have read an earlier blog entry about my problems to remove a Data Collector (DC) information in SQL Server 2008. I still haven't found any info on how to do this, but my questions in the MVP group triggered some activity.&lt;/P&gt;
&lt;P&gt;Bob Ward looked into how to rebuild the system databases. This was on my list to try (after removing DC config and if that didn't work rebuilding msdb). But Books Online had very little information on how to actually do the rebuild. Since there were quite many changes in setup between 2005 and 2008, I didn't feel like trial and error based on how we did this in 2005. &lt;/P&gt;
&lt;P&gt;Bob helped me out with some information on how to do the rebuild and it is very easy! I now have a bat file which does rebuild of three instances - and it only takes 5 minutes. And even better: no installation media is required - and it also remembers the collation for my system databases!&lt;/P&gt;
&lt;P&gt;Enough said. Check out Bob's blog post at: &lt;A href="http://blogs.msdn.com/psssql/archive/2008/08/29/how-to-rebuild-system-databases-in-sql-server-2008.aspx"&gt;http://blogs.msdn.com/psssql/archive/2008/08/29/how-to-rebuild-system-databases-in-sql-server-2008.aspx&lt;/A&gt;&lt;/P&gt;</description></item></channel></rss>