Older files are not removed when the job is run.

  • I have a regular backup plan for the databases in my server.The backup of database are going fine but the problem is with the removing the older files.

    It is not removing the older backup files.The job step of backup is:

    EXECUTE master.dbo.xp_sqlmaint N'-PlanID C7981EA9-E64B-4EEF-9498-8E9062712E25 -VrfyBackup -BkUpMedia DISK -BkUpDB "\\Servername\foldername" -DelBkUps 1DAYS -CrBkSubDir -BkExt "BAK"'

    What could have gone wrong?

  • Check that the time passed is really 1 day. It doesn't remove the files when the next backup has occurred, but when a full day has passed between backups. you might try changing this to 23 hours if you backup once a day.

    Be sure that the SQLAgent account has rights to delete files as well. Have you examined the maintenance plan logs?

  • Actully my backup plan is to retain for two days and delete any file older than that.I will change to 47 hours and see if retains for 2 days and deletes any backup older than 2 days.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply