?
Solved

Access - LDB lock file

Posted on 2016-10-07
4
Medium Priority
?
107 Views
Last Modified: 2016-10-07
I have an app that opens a OLEDB connection to access database.  I close the connection and call  Dispose.  However, the LDB stills exist and does not go away until I close the app.   Is this normal?
0
Comment
Question by:HLRosenberger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 58
ID: 41833837
It can be.  It depends on if the user/process has delete rights on the file and directory.

Normally the .LDB is deleted when the last user exits the DB.   But it is left if security prevents deleting it, or the DB has been flagged corrupt (so the the user can be identified).

If your able to still use the DB after it's left, then there is not really an issue.

Deleting of the .LDB was added long ago to speed up logins on Novell servers, but it's not actually required.

Jim.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41833902
yes, I can still use the database afterwards, even with the LDB present..    And I can manually delete the file.
0
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 total points
ID: 41833912
<<yes, I can still use the database afterwards, even with the LDB present..    And I can manually delete the file.>>

 So it's probably directory security on the file for the process/user that is using the DB.

 and there is no real harm in it being left behind.  It's nice though in that you have an indication that no one is in the DB and it cleans out "phantom users".

  I'll explain the last a bit.  When you login to a DB, an entry is created in the LDB file, which is an array of 255 elements of 64 bytes each; 32 bytes for the machine name and 32 bytes for the user name.

  For the user name, unless you use workgroup security, all the users will read as "admin".

  Once that entry is made, a corresponding "user lock" is created.  This is actually what tells you a user is active or not.

 Many LDB view utilities do not check for this lock, but simply look in the LDB file iteself.   If they do this, then you might see old "phantom" users who are not actually in the DB.

 However if those utilities use the JET ShowUserRoster function, or the ADO method, the locks are looked at and users will be reported accurately.

Jim.
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 41833921
ok.  thanks!
0

Featured Post

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question