Solved

Access - LDB lock file

Posted on 2016-10-07
4
50 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
  • 2
  • 2
4 Comments
 
LVL 57
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 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access 2007 Count Unique Values in a Group 5 35
Tags from access to excel 3 32
Search Form not Querying 2 12
Access 2010 Query Syntax 5 26
This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now