SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Cannot delete backup file; access is denied


Cannot delete backup file; access is denied

Author
Message
Dave-3000
Dave-3000
SSChasing Mays
SSChasing Mays (652 reputation)SSChasing Mays (652 reputation)SSChasing Mays (652 reputation)SSChasing Mays (652 reputation)SSChasing Mays (652 reputation)SSChasing Mays (652 reputation)SSChasing Mays (652 reputation)SSChasing Mays (652 reputation)

Group: General Forum Members
Points: 652 Visits: 571
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.
ramses2nd
ramses2nd
SSC-Addicted
SSC-Addicted (410 reputation)SSC-Addicted (410 reputation)SSC-Addicted (410 reputation)SSC-Addicted (410 reputation)SSC-Addicted (410 reputation)SSC-Addicted (410 reputation)SSC-Addicted (410 reputation)SSC-Addicted (410 reputation)

Group: General Forum Members
Points: 410 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.



rocky
rocky
SSC-Enthusiastic
SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)SSC-Enthusiastic (160 reputation)

Group: General Forum Members
Points: 160 Visits: 246

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.


Rudyx - the Doctor
Rudyx - the Doctor
SSCarpal Tunnel
SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)

Group: General Forum Members
Points: 4739 Visits: 2503
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."
gabrielko_47
gabrielko_47
Grasshopper
Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)

Group: General Forum Members
Points: 16 Visits: 52
Long Path Tool helped me in this situation. http://PathTooDeep.com :-P
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search