--备份数据库
declare @FileName varchar(240)
if datename(weekday, getdate())='星期三'
begin
select @FileName='Db星期三.bak'
end
else
begin
select @FileName='DbAutoBack.bak'
end
set @FileName='E:\DbBackUp\'+ @FileName
Backup DATABASE
CC3 to disk=@FileName
with format --强制备份 (不会追加到原有备份中)