SQLServer代码差异备份
--完整备份
Declare @FileName varchar(100)
Set @FileName='D:\' + convert(varchar(10),getdate(),120)+ '.bak'
BackUp Database CoalTraffic To Disk=@FileName
With Init
Declare @FileName varchar(100)
Set @FileName='D:\' + convert(varchar(10),getdate(),120)+ '.bak'
BackUp Database CoalTraffic To Disk=@FileName
With Init
--差异备份(必须与完整备份同名)
Declare @FileName varchar(100)
Set @FileName='D:\' + convert(varchar(10),getdate(),120)+ '.bak'
Backup database CoalTraffic To Disk=@FileName
With Differential
Set @FileName='D:\' + convert(varchar(10),getdate(),120)+ '.bak'
Backup database CoalTraffic To Disk=@FileName
With Differential