1, start Sql Server agent
2, new job...
3, routine, step, plan to fill in order
4, the routine to fill in the name of the new job;
Steps can be created through the Sql text of the new step, to create an automatic backup of the Sql commands are as follows:
DECLARE @path NVARCHAR(200)
--Constructed filename
set @path = convert(NVARCHAR(19),getdate(),120) --date
set @path = REPLACE(@path, ':' , '.') --Replace:
set @path = REPLACE(@path, '-' , '_')
set @path = 'E:\Backup\db\' + @path + '.bak'
BACKUP DATABASE Database name TO DISK = @path WITH NOINIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT
Periodicity of automatic backups can be set in the schedule
Our company: 3w.whlilong.knife anti-mother