How To
How To - Setting up an automatic backup with Express version of SQL Server
Because SQL Server express versions don’t have the possibility to run Scheduled tasks themselves, we need to do it in another way with Scripts and the Windows Task Scheduler:
- Add a new windows login to the SQL server that has enough access to take backup and restore databases
- This can be done in the SQL studio management console
- This can be done in the SQL studio management console
- Download the zip file attached and extract the files to a place where the windows user has access on the server where TM Master is installed and do changes in the files so they correspond with the file paths and databases for the installations
- Install sqlcmd Utility if you have not already installed it. This can be download from the page below if you don’t already have it:
https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-2017
Follow the instructions so the Utility gets installed with default preferences if you don’t have other preferences - Create a new Scheduled task
- Search for Task Scheduler on your server and open it
- Create a new task and give it a descriptive name
- Create a trigger, usually time based
- Add an “Start a program” action and define “powershell.exe” as the starting program
in the “Add arguments” field you need to add: -noprofile -executionpolicy bypass -File C:\TEMP\Script\BackupPS.ps1 - Remove all the checkboxes in the Conditions tab if you do not have other preferences
- Keep the default settings in the Settings tab if you do not have other preferences
- When you are finished, you can press OK and the task should ask for Credentials that you need to fill in.
If you want an automatic backup and restore to a test environment and you can do the same, but use the BackupandRestore.sql instead of the Backup.sql.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article