Solved

Access - LDB lock file

Posted on 2016-10-07
4
78 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

807 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