码迷,mamicode.com
首页 > 数据库 > 详细

sql server数据库备份语句

时间:2016-06-16 18:23:43      阅读:336      评论:0      收藏:0      [点我收藏+]

标签:sql server数据库备份语句

DECLARE @strPath NVARCHAR(200)


set @strPath = convert(NVARCHAR(19),getdate(),120)
set @strPath = REPLACE(@strPath, ‘:‘ , ‘.‘)
set @strPath = ‘备份路径‘+‘CopyBSS‘+@strPath + ‘.bak‘

backup database 数据库名 to disk = @strPath
 with noinit , nounload , noskip , STATS = 10, NOFORMAT

sql server数据库备份语句

标签:sql server数据库备份语句

原文地址:http://lujinxiong.blog.51cto.com/9367514/1789901

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!