SQL2005数据库备份T-SQL

DECLARE @strPath NVARCHAR(200)
set @strPath = convert(NVARCHAR(19),getdate(),120)
set @strPath = REPLACE(@strPath, ':' , '.')
set @strPath = 'D:/DataBase/AutoBAK/' + 'db_baomuqqcom'+@strPath + '.bak'
BACKUP DATABASE db_baomuqqcom TO DISK = @strPath WITH NOINIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT
posted on 2011-09-15 04:25  米高佐敦  阅读(157)  评论(0编辑  收藏  举报