declare @name varchar(100) declare @disk varchar(100) declare @temp varchar(100) set @temp=Replace(Replace(Replace(Replace(Convert(varchar(30),GETDATE(),21),‘:‘,‘‘),‘ ‘,‘‘),‘-‘,‘‘),‘.‘,‘‘) set @name=N‘DEMO‘[email protected]+‘-完整 数据库 备份‘ set @disk=N‘F:\Backup\[full]DEMO‘[email protected]+‘.bak‘ BACKUP DATABASE [CMDI] TO DISK = @disk WITH NOFORMAT, NOINIT, NAME = @name, SKIP, NOREWIND, NOUNLOAD, STATS = 10 declare @name1 varchar(100) declare @disk1 varchar(100) declare @temp1 varchar(100) set @name1=N‘DEMO‘[email protected]+‘-差异 数据库 备份‘ set @disk1=N‘F:\Backup\[diff]DEMO‘[email protected]+‘.bak‘ BACKUP DATABASE [CMDI] TO DISK = @disk1 WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = @name1, SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO
时间: 2024-10-11 07:16:58