Page 1 of 1

Automating SQL database backups with SQL Server Express

Posted: Thu Dec 11, 2008 10:12 am
by AbleMods
Found this today and thought I'd share with the community.

http://code.msdn.microsoft.com/SQLExamp ... essBackups

For those that don't know, SQL Server Express doesn't include a scheduling feature. As a result, site admins are unable to automate their database backup process. Shared hosting environments usually don't have this issue as they tend to use the full flavor of SQL Server.

But for less complex installs like mine that use SQL Server Express, it is a constant hassle having to manually run database backups. Using this script, you can quickly execute a single stored procedure to back up all your databases in a single command.

If you're lucky enough to have access to your web server console, you can even use Windows Scheduler to automate the stored procedure. Instructions for the proper command line are included at the end of the stored procedure.

Enjoy!

p.s. and Yes, you SHOULD be backing up your store database(s) on a regular basis. I would do it even in a shared hosting environment. The last thing I want is my entire store history dependent on some rookie college grad making $12/hour working the graveyard shift at the ISP. Check with your hosting provider on their SQL backup (and recovery) procedures.