Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Cannot delete backup file; access is denied Expand / Collapse
Author
Message
Posted Tuesday, November 15, 2005 10:57 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 2:09 PM
Points: 442, Visits: 531
Our dev database server is Windows 2000 SP3.  Every so often we hit this error message in a maint plan when trying to delete an old database backup file:  "Cannot delete whatever_20051114_015214.bak:  Access is denied.  The source file is in use."  Each time, it happens at 1 a.m., when nothing else obvious is running on the system.  Our usual fix is to bounce the server.  Is there a better solution to this?  Thanks.


There is no "i" in team, but idiot has two.
Post #237283
Posted Tuesday, November 15, 2005 12:39 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, May 30, 2012 8:02 AM
Points: 302, Visits: 294
I have had the same problem recently with one of our servers.  I tried stopping the SQL Services and agent seperatly but that did not fix the problem.  We ended up rebooting the server and that did correct the problem.  In the end the server was rebuilt anyway and the problem has not come back since.  While researching the problem I did find a number of software utilitites out there that can detect which process has locked the file but I never tried any of them.


Post #237299
Posted Wednesday, November 16, 2005 9:45 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, June 19, 2014 9:38 AM
Points: 92, Visits: 240

Is there a tape backup application (EDM, Legato, etc.) that is running at this time?  If the file is being backed up to tape at this same time, that would explain why the maint plan can't get a hold of it to delete it.

Post #237570
Posted Wednesday, November 16, 2005 12:01 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 4:38 PM
Points: 3,214, Visits: 2,335
You should also look into anti-virus software. Additionally, if you are using a SAN or NAS, there may be volume replicating servi ces executing. However you can actually delete the file without rebooting - of course you'll need a little help ... the Winternals Process Viewer (it's free !) ... it's just an executable and a help file (no installation or reboot needed) ... it will allow you to look for the process or file handle that has the file and you can then either kill the process or if the process is already dead, close the file handle ... then fou can delete the file.



Regards
Rudy Komacsar
Senior Database Administrator

"Ave Caesar! - Morituri te salutamus."
Post #237609
Posted Tuesday, October 2, 2012 12:54 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 11, 2012 6:44 AM
Points: 4, Visits: 52
Long Path Tool helped me in this situation. http://PathTooDeep.com
Post #1366871
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse