Avatar of RichNH
RichNH

asked on 

Delete locked file that nobody is accessing

I have an MSAccess LDB file which when I try to delete it says it is locked by another user but which I know nobody else is accessing.  How can I delete this file?  It is located on a file server running under Win 2000 Server
Microsoft Server OSMicrosoft Access

Avatar of undefined
Last Comment
Pber
Avatar of puppydogbuddy
puppydogbuddy

Reboot eindows and then try and delete.
Ps: The above assumes you first shut down ms access and could not delete the ldb.
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of RichNH
RichNH

ASKER

Thanks guys, I'll try that the first chance I get, perhaps I can come in this Sunday and give it a shot.  Usually there's nobody here then.  I'll let you know.
Avatar of Pber
Pber
Flag of Canada image

Something has a handle to the file and thus you can't delete it.  Instead of blindly rebooting the server to fix a problem, you can find out what process has the handle, and then kill the handle and you can do all this without rebooting.

Grab handle from here: http://www.microsoft.com/technet/sysinternals/utilities/handle.mspx

Once you find the handle that has it open, you can close it with the command, or you can use process explorer to do it via gui:

http://www.microsoft.com/technet/sysinternals/utilities/ProcessExplorer.mspx

With process explorer, load it and select view, Lower Pane View, Handles

Then select the process that handle.exe found and you can release the handle by right clicking the LDB file below and selecting Close Handle.

Or you can just click though the process one by one and look at the File handles.  Then select your LDB file when you find it and close the handle.

Once the handle is gone, you can delete the file.

This way you have a better chance of finding what is actually causing the problem.  Could be antivirus, or a defrag util, etc.  
<<Something has a handle to the file and thus you can't delete it. >>

   A somewhat simpler technique is to right click on My Computer, Select manage.  Go to Shared Folders, then open files.  Right click on the correct open file and then select close.

JimD
Avatar of Pber
Pber
Flag of Canada image

Jettman,

That list is network session based and if the network session is closed, the open files will not show it.  I find that method hit and miss, 99% miss.

Also if something is accessing it locally (like Antivirus or a local user), it will never show up in that list.

<<That list is network session based and if the network session is closed, the open files will not show it. >>

  Yes, I should have mentioned that.  I generally go there first because it's simpler to do and most often, it's a network user that has the file locked.

JimD
Avatar of Pber
Pber
Flag of Canada image

Yes I agree.  I failed to mention that since it usually isn't our issue and we usually end up with the process explorer method to release that handle.
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo