SQL2005数据库备份TSQL

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
原文地址:https://www.cnblogs.com/jordan2009/p/2176844.html