Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL .Bak files not being deleted - Hard drive full

Posted on 2006-11-16
5
Medium Priority
?
2,373 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
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.

670 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