SQL Server Central is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 

Full, diff and tlog backups based on recovery mode

By pattyd0319, 2003/06/06

Total article views: 352 | Views in the last 30 days: 14

    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.

By pattyd0319, 2003/06/06

Total article views: 352 | Views in the last 30 days: 14
Your response
 
 
Related tags
 
Already registered?  

Free registration required

To read the rest of this article, and access thousands of other articles, we ask you to register on the site and subscribe to our newsletters.

Register

E-mail address:
Password:
Password (confirm):

  

Subscriptions

We ask you to register on the site and subscribe to our newsletters. Subscribing to our newsletters gets you:

  • ALL of our content (thousands of articles, scripts, and forum postings)
  • A daily newsletter (example)
  • A weekly news round up (example)
  • The opportunity to ask and answer questions in our forums
  • A daily Question of the Day to test and help you increase your knowledge of SQL Server.

We ask that you give the newsletter a try for a week. Over 200,000 SQL Server Professionals a day find it entertaining and useful. If not, you are welcome to unsubscribe at anytime.

Steve Jones
Editor, SQLServerCentral.com