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

Backup by datetime file name

By Jason S Wong, 2010/07/12

It is an optional tool to use SQL Server Maintainence Plan to schedule regular backups of your databases. To take advantages of full control, total flexibility, I use my own scripts to backup databases. Here is an simple example to show how to backup database by the datetime file name. You can simply modify this to run differential backup or to backup log. Put them as SP in AdminDB and schedule Agent Job for it, just that simple. Use my other script to check review disk space. If you have custom request, please email me.

 

I suggest readers further enhance this script by coding the parameter in database table such as the backup drive letter, use sys.sysservers to get server name, use a loop to pick up active db names (see my other code publication), use xp_cmdshell to create backup directory, use admindb data table to store runtime and status, etc. I have coded comprehansive DB backup scripts I use for the DBs I manage.

Total article views: 1819 | Views in the last 30 days: 4
 
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

Tags
 
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