tags:

views:

12

answers:

0

If I make a database backup job, where I set Expire day = 2. Run this backup job once every day. How can I delete backup sets that are more than 2 days old? I'm Using SQL 2005 Express, so everything runs as script. This is the script running:

BACKUP DATABASE [DatabaseName] TO DISK = N'C:\Temp\DatabaseName.bak' WITH RETAINDAYS = 2, NOFORMAT, NOINIT, NAME = N'DatabaseName-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO

After 5 days I have 5 backup set. This will fill up the disk....

Thanks