Access lock file does not get closed/removed.

Hi Experts,
I have my Access backend database on the server and some times nobody is using it, I can go into design of each of the tables.
However the lock file does not get closed after closing all Access instances.
Is it safe to copy over the file to a different location, compact it and place it back in the original location?
LVL 6
bfuchsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bharat BhushanSolution ManagerCommented:
If you are sure no one is using it.  It should be noted that file remaining in place means someone does not have the proper permissions to the folder where the Back-end resides.
Gustav BrockCIOCommented:
Yes, that is safe. But also delete the lock file.

And try to find out which workstation is leaving the lock file. It should be deleted when the last user signs out.
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
I would add that it being left behind doesn't really hurt anything.    Way back when, the .LDB was never deleted.

   They (Microsoft) made the change to help with certain login situations (mostly on Novell servers).  The other reason is that if your reading the .LDB file directly, you'll often see some "phantom" users in it.

   They are truly not because it is the corresponding user lock that determines if a user is active in the DB or not and the slot in the .LDB is "active".   By deleting the file, these get cleaned up.

  Last, one case where you will see a .LDB left behind is if the database is flagged corrupt (prompts for repair).   The .LDB is left behind so that the station that set the flag can be determined.

Jim.
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

bfuchsAuthor Commented:
Hi Experts,

Just returning from weekend vacation...

And try to find out which workstation is leaving the lock file.

The .LDB is left behind so that the station that set the flag can be determined.

So what is out there to help find out which users have this lock file open?

When I look at the servers managing open files, nothing is listed there...

FYI- The BE file is Access 2003 format, and FE by most users is A2007.

Thanks,
Ben
Bharat BhushanSolution ManagerCommented:
Yes, that is safe. But also delete the lock file.

And try to find out which workstation is leaving the lock file. It should be deleted when the last user signs out.

It should be and, if you have all the right permissions then maybe recreate the profile, it might have gone bad.
Gustav BrockCIOCommented:
So what is out there to help find out which users have this lock file open?

There is the old LDBView Utility which works for mdb files only.

It can be hard to locate, so I have attached a copy. Rename it to .exe
LDBView.ex_
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<So what is out there to help find out which users have this lock file open?>>

 If you cannot delete the .LDB/.LACCDB, then there is a handle open in the OS.   If it's opened over the network, you will see it open in the server manage files.   However if it's opened on the server, then you would need to use Process Explorer:

https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer

 To find the file handle and close it.   This is how you can get rid of a .LDB file that you cannot delete without rebooting the server.  There are a few freeware utilities out there floating around that make it simpler, but that's the jist of it (closing the file handle).

<<FYI- The BE file is Access 2003 format, and FE by most users is A2007.>>

  Keep in mind that the lock file is associated with the DB....so if there is a FE/BE, there will be one for each.   gustav posted the old LDB View utility.   It has not been updated for A2007 and up.   Instead, you would need to use the JET SHOW USER ROSTER funtion:

https://support.microsoft.com/en-us/help/285822/how-to-determine-who-is-logged-on-to-a-database-by-using-microsoft-jet

and there are plenty of utilities floating around based on that:

https://www.access-programmers.co.uk/forums/showpost.php?p=1544570&postcount=2

This one includes the "Suspect State" flag (the corrupt flag).   It also shows the "Connected" status.

Ones that are listed "Yes" have an active user lock and are connected to the DB.

Ones that are listed "No" can be the "phantom" users I was talking about earlier if the lock file is not routinely deleted.    This is a user where a machine/username is still in the file, but there is no active user lock in the OS.

Jim.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bfuchsAuthor Commented:
Thank you my experts.
Bharat BhushanSolution ManagerCommented:
Thank you my experts.

Most welcome!

Regards,
Bharat
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.