Database Maint. Backup

  • I have a problem with deletions of old .BAK files using the Database Maintenance Plan. On some occasion .bak are not been deleted and the plan sends me a failure email. if the failure is at 1:00 am the job runs again at 2:00 am the same file is deleted with an success. this occurs usually 2 to three times a night at different times and not the same database we are backing up db every hour and cleaning up old .bak files every 4 hours.

    Database PurchaseOrdersData: Delete Old Backup Files...

    Unable to delete file G:\DatabaseBackup\MSSQL\PurchaseOrdersData\PurchaseOrdersData_db_200802130001.BAK. 0 file(s) deleted.

  • Did you check whether or not the backup file was in use when the deletion failed?

    You may add a log file in your database maintenance plan to obtain information in detail.

  • At that time of night theses file are not in use. I have a log file created each time the job runs. Thanks!

  • Any tape sweeps of the files running at this time? That one has got me a few times in the past where infrastructure was running automated tapes sweeps of my backup files and their processes ran longer than normal, thereby locking the file when my automated job needed it.

    -- You can't be late until you show up.

  • That is something I thought about. but because it is happening at different hours it is hard to say. What is happen now is say at 4:00am a .bak file is created and so on for each succeeding hour. say at 9:00 am the 4:am file should be deleted based on cleanup schedule. the 4 am files will not delete and any files that was created after that will not delete. I can go in and manually delete all the files with the exception of the 4 am. this may continue for 5-6 hours. before it clears up.

  • I have had issues with maintenance plans for backups on Sql Server 2005.

    I have since fallen back to executing the backup via T-SQL as a step within the Maintenance plan - and this seems to work without issues.

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

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