July 11, 2006 at 8:18 am
I have a DB Maintenance Backup Job not deleting old backups and it has filled up the drive. I am backing up 'ALL User Databases' not master, model and msdb. I am specifying that backups older than 1 day should be deleted and I am seeing backups about up to 4 days old there.
Should I drop and recreate the maintenance plan?
July 11, 2006 at 8:55 am
Not sure if this is specifically your issue without more details - I've had a similar problem in which at very low disk space something like this happens:
SQL200 runs the maintenance plan, it backs up the database(s). It seems that it tries to remove the old files only after it has performed the new backup (sensible) and if it lacks a certain amount of disk space to do this, this part will fail, allowing the disk to fill up. Unless you're getting a specific error (permissions, etc) that indicates your problem lies elsewhere, I would attempt to clear enough disk space for at least 1.5 * the total size of all backups being made (if this is possible), leaving several very old files that should unquestionably be deleted by the maintenance plan (for starters) and run it to test if it removes the old files.
-- http://dbachman.blogspot.com
July 11, 2006 at 8:58 am
Do your log files indicate that there is any issue at all with the jobs? It is indeed true that if the job fails, the cleanup will not run.
July 11, 2006 at 9:10 am
The maint plan aren't great. If one part fails, like a backup can't complete, it doesn't get to the cleanup as mentioned abovce. I'd check the log history and be sure that it's actually completing the backups.
July 11, 2006 at 11:31 am
But as I indicated I had old backups from up to 4 days ago. I do not believe disk space was an issue in the last 4 days.
July 12, 2006 at 6:55 am
Change the deletes to 22 hours old. I've run into issues where it won't delete the backups because it run a second earlier then it did last night.
July 12, 2006 at 7:22 am
October 12, 2007 at 2:11 pm
Deedee (7/11/2006)
Not sure if this is specifically your issue without more details - I've had a similar problem in which at very low disk space something like this happens:SQL200 runs the maintenance plan, it backs up the database(s). It seems that it tries to remove the old files only after it has performed the new backup (sensible) and if it lacks a certain amount of disk space to do this, this part will fail, allowing the disk to fill up. Unless you're getting a specific error (permissions, etc) that indicates your problem lies elsewhere, I would attempt to clear enough disk space for at least 1.5 * the total size of all backups being made (if this is possible), leaving several very old files that should unquestionably be deleted by the maintenance plan (for starters) and run it to test if it removes the old files.
I am sure this is the issue with mine. I never thought it would not delete the files first even thought that makes more sense. I will change the backup to another drive and try it there.
January 14, 2008 at 9:40 am
Hello,
Can anyone tell me where to set the job to delete the old backups first instead of at the end?
😀
January 14, 2008 at 1:56 pm
In my memory, SQL 2000 backup a database first and then delete old one if the backup is successful by default.
You can remove the old backup files using xp_cmdshell command in SQL Server.
When you said that the old databases could not be deleted automatically, take a look at whether or not there is any application running against your databases, such as whether or not there is any tape backup on these databases. If so, the databases are in use, SQL Server could not delete them.
Hopefully, they are helpful.
April 29, 2008 at 7:48 am
can i user database maintenance plan for only deleting old backup files in sql server 2005
pls help
November 27, 2008 at 9:27 am
Just like to say thanks to the posters on this thread and the advice of checking that all the jobs ran successfully. As a result I managed to solve a problem that should have been obvious!
I recently added a new database which was set to Simple recovery model. I added this db to an existing Database Maintenance Plan that included a transaction log backup and had a retention period for tlog backup files.
The tlog backup for this db obviously failed and subsequently the maintenance plan did not continue with deleting the tlog backups for all our db's as per retention period. This filled up our transaction log volume quite quickly and caused a minor outage.
I have created a new db maintenance plan specifically for this db that excludes a tlog backup. The original maintenance plan is now happilly deleting the tlog backups as normal.
November 28, 2008 at 7:49 am
martincjones (11/27/2008)
Just like to say thanks to the posters on this thread and the advice of checking that all the jobs ran successfully. As a result I managed to solve a problem that should have been obvious!I recently added a new database which was set to Simple recovery model. I added this db to an existing Database Maintenance Plan that included a transaction log backup and had a retention period for tlog backup files.
The tlog backup for this db obviously failed and subsequently the maintenance plan did not continue with deleting the tlog backups for all our db's as per retention period. This filled up our transaction log volume quite quickly and caused a minor outage.
I have created a new db maintenance plan specifically for this db that excludes a tlog backup. The original maintenance plan is now happilly deleting the tlog backups as normal.
What I do is have separate subplans
1 for FULL
1 for DIFF
1 for TLOG
1 for cleanup
This way cleanup ALWAYS runs independent of the results of previous 3 steps
Also, in Maint. Plan interface (SSIS look), you can change the "green line" conditions to set it to ALWAYS run
Defaults to condition "success" only, but I believe you can change it to "completion" so that a 2nd task is run always as well
February 26, 2009 at 1:02 am
my sql server 2000 db maintanence plan is not deleting the old backups.because of this backup is failing due to space issue.i set to delete backups older than 23 hours.
February 26, 2009 at 7:36 am
How often are you backing up? I have maintenance plans that delete files older than 2 weeks and have never seen it fail to do it. How big are your databases? Maybe time to add more disk or copy them from the local drives to a network share where there is more space available. Be sure NOT to delete the file until a new backup file has been created. If the backup fails and you've deleted your last copy, it could spell trouble.
Edit - You really should've opended a new thread as opposed to hijacking an existing one. Posters who've maybe already posted here or read it may not come back again. A new thread would probably get you more responses - IMO.
-- You can't be late until you show up.
Viewing 15 posts - 1 through 15 (of 15 total)
You must be logged in to reply to this topic. Login to reply