数据库备份

declare @path varchar(800)
declare @name varchar(100)
set @name = 'DatabaseName';
set @path = 'D:\DataBaseBack\' + @name + '_' + convert(varchar(50),getdate(),112)+'.bak'
backup database @name to disk = @path with noinit,nounload,noskip,stats=10,noformat

posted @ 2013-05-17 14:08  ajunfly  阅读(124)  评论(0编辑  收藏  举报