Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access - LDB lock file

Posted on 2016-10-07
4
Medium Priority
?
111 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

598 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