Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Full, diff and tlog backups based on recovery mode

By Patty Dunbar, 2013/05/18

    This a script which creates stored procedures that can be executed adhoc or set as sql agent jobs to check the recovery status and generate full, differential or transaction log backupf for each database if the database recovery status is set to full.  We have terabytes of data and set all production databases to full and all test and demo databases to simple. This helps to ensure all our production databases are backed up while avoiding unnecessary backups.
    The full and transaction log backup call the sqlmaint utility which simplifies deleting old backups by setting the -delbkup parameter. The differential backup includes an extra vbscript component to delete old backups as you cannot use the sqlmaint utility.
    Complete instructions are in the script so please read and follow carefully. Feel free to email me with any questions. When you get to the visual basic script portion, check the format as unlike SQL, all code must be on the same line or use the ampersand, followed by a space and then the underscore keystroke & _ after each line to continue to the next. My thanks to Mr. Knight as I used his book "SQL Server 2000 for Experienced DBAs" for reference when building components of this script.

Total article views: 883 | Views in the last 30 days: 3
 
Related Articles
ARTICLE

Powershell Database Backup Script

Learn how to write a script for regular database backups using Powershell and SMO.

FORUM

xmla script for automate ssas database backup

xmla script for automate ssas database backup

SCRIPT

Backup & Restoration Script

This script provides very useful information about database backup and restoration.

BLOG

Script: Backup All your Databases

We all know the importance of taking regular backups of our SQL Server databases. This is a useful l...

FORUM

Auto Backup Script

Auto Backup Script

 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones