Have you ever attempted to setup an automated backup of your SQL Server Express database server, only to discover that the handy job scheduler maintenance options that you are accustomed to using with the full version of SQL Server are not available with the express edition? After a brief search of Google, you may have noticed that others have managed to implement this procedure, but they either ended up purchasing a 3rd party product solution or they are using the less than ideal practice of pausing the SQL Server Express Service in order to create a backup copy of the MDF and LDF files (this means that the SQL Server is briefly taken offline). This works, but for servers that must be live on a 24/7 basis, this is not the best solution.
Of course you can upgrade your SQL Server Express to the full edition of SQL Server; however, this is very expensive. If your current implementation of SQL Server Express meets your needs with the exception of this dilemma with obtaining a backup, you will be enthused to discover that there is a way to accomplish this task using the Express Edition (without pausing the SQL Server service and without the purchase of a 3rd party utility). Simply follow these steps:
Backups require installing the SQL Server Management Studio Express. This is a free download that comes with recent versions of SQL Server Express. Select it from the same place you download the main progrram. If you are using SQL Server Express 2008 R2 SP1 or earlier, there is a separate download link. For more information on the different versions and links for downloads, visit our SQL Server Express: Version Comparison Matrix and Free Downloads page.
The examples below show screenshots from SQL Server Management Studio Express 2014, which is similar to earlier versions of SQL Server Express.
Run SQL Server Management Studio Express.
The setup of the backup job is now complete. Repeat these steps for each database you wish to backup.
A batch file can be used to run the SQL Server backup job that you just created. Here's an example (remember to save this file with a "BAT" file extension):
--- < Begin Code Batch Script > --- sqlcmd -S MYSERVER\OFFICESERVERS -E -Q "BACKUP DATABASE MASTER TO TESTBACKUP" --- < End Code Batch Script > -----..where "MYSERVER" is the name of the SQL Server physical machine.
For this task to run automatically, it must be assigned to a scheduler program. Here are a few options: