标签:
declare @bakfile varchar(30), @bakfilediff varchar(30),@pathfull varchar(50),@pathdiff varchar(50)
set @bakfile=‘hp‘+CONVERT(varchar(10),GETDATE(),112)+‘.bak‘
set @bakfilediff=‘hpdiff‘+CONVERT(varchar(10),GETDATE(),112)+‘.bak‘
set @pathfull=‘c:\bak\‘+@bakfile --定义全备路径
set @pathdiff=‘c:\bak\‘+@bakfilediff --定义差异备份路径
backup database hp to disk=@pathdiff with differential --差异备份
标签:
原文地址:http://www.cnblogs.com/shawnloong/p/4574777.html