Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We want to schedule sql database backups like you are able to do with SQL Agent Job Scheduling Service. Is there any way of doing this backups on the SQL 2005 Express edition?

share|improve this question
up vote 2 down vote accepted

I've worked around this in two ways:

  • You can use Windows' Scheduled Tasks to execute a script using SQLCMD.
  • If you have other SQL Servers that are not the Express edition, you can create maintenance plans on those servers that point to the Express server.
share|improve this answer

You can script the backup and use a scheduled task to do it. Here's an example of what to use as the command for your task using the osql command line tool (or what to put in a batch file):

osql -s myserver -E -Q " BACKUP DATABASE MyDB TO DISK = 'C:\SQLBackups\MyDB.bak'"

Here is the MSDN reference page for the SQL 2005 BACKUP statement if you need to incorporate more options to your backup than the very basic statement above.

share|improve this answer
Hello squillman. Your command works, but when I restore the file MyDB.bak it will bring all tables, store procedures, security settings, but the login for the sql engine is not mapped. Any idea on how to bring the security settings on the engine itself? – Geo Jul 28 '09 at 21:51
If you're restoring to the same instance that the backup was taken from then the db security should map just fine after a restore. – squillman Jul 29 '09 at 4:19

You can use external backup software like Cobian Backup for scheduling and compressing. For the database backup itself, one option is to use ExpressMaint

More answers here:

share|improve this answer

I had this a problem a few years back and have been using the simple batch file and sql script ever since.

i wrote a post covering it here with included scripts and walkthrough:

basically i do the following: - write a stored procedure that backups up a specified database - write a sql script that calls this for each of the databases i want to backup - call the above script using sqlcmd.exe using a scheduled task

this allows me to choose when it happens on a schedule and run different databases when i want

you can then use a scriptable ftp client like WinSCP ( to create another schedule that uploads the backups using FTP or SFTP (much more secure).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.