Solved

SQL .Bak files not being deleted - Hard drive full

Posted on 2006-11-16
5
2,355 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

919 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now