![]() ![]() 'you need to create a folder named "scripts" for ease of file management & 'used for writing to textfile - generate report on database backups deleted Set fso = CreateObject("Scripting.FileSystemObject") *Update – If you’d rather use Ola Hallengren’s solution, see my post on Using Ola Hallengren’s SQL Server Maintenance Solution with SQL Server Express Edition.ĭim fso, folder, files, sFolder, sFolderTarget (NOTE: Replace the text “YourDBhere” with your database name, and specify the desired location of your backup directory) We’re going to save it as dailyBackupScript.sql. “Scripts” for all of the scripts we’re going to write, and “Daily” for all of the daily backup files to be stored.įirst, here’s the actual SQL script that backs up the database. For the sake of this example, I’m going to be directing everything to a “DatabaseBackups” directory, which has two directories in it. ![]() ![]() It’s a quick-n-dirty script, which I’m sure can be improved, but it works well. This really isn’t a big deal, but it is annoying.Īutomating backups in SQL Server Express really isn’t that hard, but to save someone else the trouble of having to figure out how to do it I’ve posted the below solution that I’ve used in the past. You have to manually write the backup scripts and then schedule them to run in Windows Scheduled Tasks. One of the limitations of SQL Server Express is that you can’t automate backups in it via the SQL Server Agent like you can the other versions of SQL Server. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |