数据库自动备份

来源:互联网 发布:淘宝订购服务怎么取消 编辑:程序博客网 时间:2024/05/02 01:35

1.新建作业 

DECLARE @strPath NVARCHAR(200)set @strPath = convert(NVARCHAR(19),getdate(),120)set @strPath = REPLACE(@strPath, ':' , '.')set @strPath = 'D:\dbbak\' + 'JcZsNet'+@strPath + '.bak'BACKUP DATABASE [JcZsNet] TO DISK = @strPath WITH NOINIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT

0 0
原创粉丝点击