Database Maintenance Plan Question

  • There is an option in the Database Maintenance Plan that can delete files older than x days/months... etc i set my database maintenance plan to delete backup files older than 2 days ( that is on september 5,2007) it is now september 11, 2007 here but the backups dating september 5 -7 is no deleted in the folder it bothers me because our hard disk is running out of space. As an alternative i made a script that delete old backup files just want to know if this option in the Database Maintenance Plan is not working???  thanks in advance..

    "-=Still Learning=-"

    Lester Policarpio

  • This was exactly the reason I no longer use maintenance plans for anything.  I have found them to be flacky and hard to handle.  I had noticed this exact problem and found no solution. I have more precise control using T-SQL.  I now do all my backups, database checks, deletion of old backups etc directly via T-SQL commands.  Maintenance plans have no place where I work.

    Francis

  • Thanks fhanlon.. you do not trust maintenance plan even in database backups?? any error encountered in database maintenance plan?? because in my case database maintenance plan runs smoothly

    "-=Still Learning=-"

    Lester Policarpio

  • one thing i would say to check is that the file extension is correct, make sure you have bak and not .bak.

  • I haven't had any issue with the backup part of the maintenance plan but I have had issue with the clean up not being done.  Some of my servers have multiple user databases which are periodically added to or dropped.  It is far less effort to create a script to fully backup all databases and do transaction log backups on those databases with a recovery model of full than mess with a maintenance plan.  This way if the database recovery model gets changed to simple, transaction log backups are no longer attempted until I change it back to full.  It is also easier in my opinion to move the script and jobs to new server that are being set up as opposed to having to recreate a maintenance plan.

    Francis

  • My understanding is that it only deletes the one that have an expiration set, ones before you set the expiration do not get deleted by the maintenance plan and have to be manually deleted.

    In addition, I have found that the deletes only occurr after all current defined backups complete. Discovered this when we filled a hard drive and the job failed, all the previous backups still existed which meant we had to account for the new backup size and old as far as space.

    Furthermore, if the you have defined all user databases be backed up and you drop a database the process will not remove any of the backups for the dropped database. We just make sure when we drop a database we deleted the related backups ourselves.

  • I run a number of maintenance plans that are set to delete backups over x days old.  These all work correctly and I've never had a problem with older backups not being deleted.

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

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