创建作业,每天执行一次,然后按天生成一个备份文件
Declare @BakFileName Varchar(100)
Set @BakFileName = N'D:\cb' + Cast(Datepart(Weekday,Getdate()) As Varchar(1)) + N'.bak'
BACKUP DATABASE [dbname] TO DISK = @BakFileName WITH FORMAT
创建作业,每天执行一次,然后按天生成一个备份文件
Declare @BakFileName Varchar(100)
Set @BakFileName = N'D:\cb' + Cast(Datepart(Weekday,Getdate()) As Varchar(1)) + N'.bak'
BACKUP DATABASE [dbname] TO DISK = @BakFileName WITH FORMAT