SQL Server Agent not Deleting Old Backups

  • I often create a nightly backup job using Maintenance Plan winzard that is supposed to delete previous nightly backup files that are more than 1 day old. It works at most sites but at some sites it fails to remove old backup files in both SQL7 and SQL2000. Recreating such a job does help either.

    Has anyone experienced this problem and got any suggestions?

    Thanks.

    Jan

  • You may want to look on the SQL Server log or Job history and look for an error that is related to that backup job and may have clues on why old files are not deleted.

  • We had trouble when our backup software moving the database backup to tape had trouble and the file remained open.  As long as it was open, our SQL backup would complete and then report and error because it could not delete the old file.

     

  • Thanks Guys. I'll check both areas. Will be back.

  • I recall something that happened quite awhile ago; I believe it had something to do with the permissions that were setup for the SQL account that ran the backups. Not sure exactly what it was but might be something to check!

  • Had this happen at a client's site.  Check the available space on your backup drive.  You need enough space to do a current backup AND make a copy of yesterday's backup.  Only then will your (now) 2 day old backup be erased.  If there isn't enough room, the 2 day old backup won't be erased.

    Vik

     

     

  • Thanks, Vhanda. I think you are right. It has justed started to fail after the Db has grown to a size where there is no longer sufficient space for two copies of nightly backups.

    Thanks to everyone who responded.

Viewing 7 posts - 1 through 6 (of 6 total)

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