数据库备份脚本

 

DECLARE @strPath NVARCHAR(200)
set @strPath = replace(replace(replace(CONVERT(varchar, getdate(), 120 ),'-',''),' ',''),':','')
set @strPath = REPLACE(@strPath, ':' , '.')
set @strPath = 'E:\Backup\Mis.Backup\Mis_' + @strPath + '.bak'
BACKUP DATABASE Mis TO DISK = @strPath WITH NOINIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT

posted @ 2009-12-02 18:24  wenanry  阅读(208)  评论(0编辑  收藏  举报