Cannot delete backup file; access is denied

  • 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.
  • 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.

  • 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.

  • 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.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Long Path Tool helped me in this situation. http://PathTooDeep.com 😛

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply