sqlserver作业,数据库备份语句
< DOCTYPE html PUBLIC -WCDTD XHTML StrictEN httpwwwworgTRxhtmlDTDxhtml-strictdtd>
declare @filename nvarchar(100)
set @filename='d:\\dbbak\\test+convert(char(10),getdate(),112)
print @filename
BACKUP DATABASE [test] TO DISK = @filename WITH NOINIT , NOUNLOAD , NAME = N'test 备份', NOSKIP , STATS = 10, NOFORMAT
set @filename='d:\\dbbak\\test+convert(char(10),getdate(),112)
print @filename
BACKUP DATABASE [test] TO DISK = @filename WITH NOINIT , NOUNLOAD , NAME = N'test 备份', NOSKIP , STATS = 10, NOFORMAT