1、打开SQL Server Management Studio
2、启动SQL Server代理
3、点击作业->新建作业
4、"常规"中输入作业的名称
5、新建步骤,类型选T-SQL,在下面的命令中输入下面语句
DECLARE @strPath NVARCHAR(200)
set @strPath = convert(NVARCHAR(19),getdate(),120)
set @strPath = REPLACE(@strPath, ':' , '.')
set @strPath = 'D:\bak\' + 'databasename'+@strPath + '.bak'
BACKUP DATABASE [databasename] TO DISK = @strPath WITH NOINIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT
(D:\bak\改为自己的备份路径,databasename修改为想备份的数据库的名称)
6、添加计划,设置频率,时间等。
确定,完成。
相关文章:
-
2021-12-04
-
2021-06-28
-
2021-12-12
-
2022-01-11
-
2021-05-28
-
2021-10-24
-
2022-12-23
猜你喜欢
-
2022-12-23
-
2021-12-03
-
2022-12-23
-
2021-11-30
-
2022-01-08
-
2022-12-23
-
2021-11-18
相关资源
-
下载
2023-03-22
-
下载
2022-12-29
-
下载
2021-06-06