Avatar of joelmcm
joelmcm

asked on 

I need to clear all users and user locks from an access database in order to do some repairs. All my users swear they are off, but the database is still locked.

I need to clear all users and locks from a MS Access database. I used to have code that did this but can't find the code. Does anyone know how to do this?
Microsoft Access

Avatar of undefined
Last Comment
joelmcm
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

apart from the technical issue: if this is a ms access db on a server share where all users are accessing the file, which includes the data, the best advice to give is: change the application to a true multi-user application. ms access, despite the fact that it enables some multi-user features, it's most often not working that well.

anyhow: how the users are really connecting? is it a terminal server solution, a  network share, or what?
please try to provide more information.

meanwhile: is there the .ldb file? can you delete it? if not, use the file access monitor to see who is connected to that file...
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

If you are on a Windows Server, you can look up sessions on the file share and also list locks files.
Then you either close these brutely or notice the workstations and go to these and close the application.

/gustav
ASKER CERTIFIED SOLUTION
Avatar of pdebaets
pdebaets
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 PatHartman
PatHartman
Flag of United States of America image

Some links are more equal than others and apparently the censors are OK with a link to Peter's website which is good since he offers several useful tools.   There is also a useful free utility out there called "who's connected" so if you type "who's connected access" into Google, you'll find the link that I am not allowed to post.  Because if I post the link the censors will be on me like a ton of bricks and then delete the link.  I use this utility several times a week when the database is open to find out who's got it.  Peter's utility lets you force people out so that takes the final step.

Sometimes if you can't delete the lock file, if you open the app from your own computer and then close it, Access will delete the lock file.  Just make sure that you have CRUD permissions on the database folder.
Avatar of joelmcm
joelmcm

ASKER

Thank you all for your help.
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