Solved

SQL .Bak files not being deleted - Hard drive full

Posted on 2006-11-16
5
2,360 Views
Last Modified: 2010-08-05
We have a SQL 2000 server that backs up it's bak and trn files nightly to the local F: drive. In the database maintenance plan>>complete backup section, we have the 'remove files older than 1 day' box checked. However, none of the files are being deleted, so the drive fills up, and as a result, the nightly backups stop.

As a work around, I will try adding a scheduled task to periodically delete the files, but I would rather have sql take care of it on it's own. Any help would be appreciated.
0
Comment
Question by:dcsup
  • 2
  • 2
5 Comments
 
LVL 29

Expert Comment

by:Nightman
ID: 17957015
Check that the account under which SQL Agent is running has delete permissions to this folder.
0
 
LVL 15

Expert Comment

by:mcmonap
ID: 17957544
Hi dcsup,

some of the databases may be getting backed up but is the job completing?  Deleting files is the last thing it does so you might find that the job errors and ends before the file deletions start.
0
 

Author Comment

by:dcsup
ID: 17980106
The SQL agent is running under the 'local system account' - also the administrator has delete permissions - I can manually delete files, so it does not appear to be a permissions issue.

Looking at the most recent backup, a couple of the databases failed to backup with an event ID of 17055, even though there is enough disk space available. I will monitor a couple more days to see if it is the same databases locking up.

So it points to it being due to some ofthe databases not being backed up, but how do I confirm this? Is it safe to say that if any of the backups fail, then none of the delete tasks will run? (All of the 25+ database backups are bundled into the same job.) If so, I will close out the ticket and award all points to mcmonap, and open a new case for the failure on the backup errors.
0
 
LVL 29

Expert Comment

by:Nightman
ID: 17980157
Yes - as mcmonap stated the deletions occur after the entire taks has completed, so if it fails to complete they will not be deleted.

You could seperate each of the 25 databases into a seperate backup plan (this is probably more reliable anyway, as if one fails it won't stop the job) and run from there.
0
 
LVL 15

Accepted Solution

by:
mcmonap earned 250 total points
ID: 17981038
Hi dcsup,

I would suggest trimming down your maintenance plan as much as possible, remove anything to do with transaction log backups (have a sperate plan for these) also lose anything regarding maintenance, shrinking and all the other stuff.  Get them working with just the backups you can then add anything else you want in.  A typical failure might be because you are trying to do a log backup of a database that is in simple recovery mode.  I would also have a seperate maintenance plan for the sytem databases.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question