02-13-2020 04:24 PM
08-14-2023 10:53 PM
Dead thread, sorry to reopen but wanted to contribute.
If using SQL 2016, you may reference this site. Reference Step 2. I've extracted the steps in the event the link goes bad.
1. Log into your SQL Server via Microsoft SQL Server Management Studio
2. Right-click SQL Server Agent, select Start to enable this function.
3. Open up SQL Server Agent tab, right-click Job > New Job…
4. On General page, fill the name in the blank.
5. Turn to Step page, click New… and fill in Step name in the prompt window. Select T-SQL in Type, then input following statements in Command:>
DECLARE @strPath NVARCHAR(200)
set @strPath = convert(NVARCHAR(19),getdate(),120)
set @strPath = REPLACE(@strPath, ':' , '.')
set @strPath = 'filepath' + @strPath + '.bak'
BACKUP DATABASE [databasename] TO DISK = @strPath WITH NOINIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT
Note: as for the ‘filepath’ part you need to fill in the path created before to store these backups. For example: D:\Backup.
Then click OK.>
6. Turn to Schedules page, click New… and fill in Schedule name, select the Frequency and Duration in the prompt window. Click OK to save these settings.
7. Find the newly created job in SQL Server Agent > Jobs, right-click it and select Start Job at Step to start.
02-17-2020 11:57 AM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now