You are currently offline, waiting for your internet to reconnect

ACC: Introduction to .ldb Files (95/97)

This article was previously published under Q136128
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access database (.mdb).

SUMMARY
The .ldb file plays an important role in the multiuser scheme of theMicrosoft Jet database engine versions 3.0 and 3.5. The .ldb file isused to determine which records are locked in a shared database and bywhom.
MORE INFORMATION

Automatic .ldb File Creation and Deletion

For every database opened for shared use, an .ldb file is created to storecomputer and security names and to place extended byte range locks. The.ldb file always has the same name and is located in the same folder as theopened database (.mdb). For example, if you open (for shared use) theNorthwind.mdb sample database in the C:\MIcrosoft Office\Office\Access\Samples folder, then a filecalled Northwind.ldb is automatically created in the same folder.

Whenever the last user closes a shared database, the .ldb file is deleted.The only exception is if a user does not have delete rights or when thedatabase is marked as corrupted; then, the .ldb file is not deleted becauseit contains information about who was using the database at the time thedatabase was marked as corrupted.

Required Folder Permissions

If you plan to share a database, the .mdb file should be located in afolder where users have read, write, create, and delete (or full control) permissions. Evenif you want users to have different file permissions (for example, someread-only and some read-write), all users sharing a database must haveread, write, and create permissions to the folder. You can, however, assignread-only permissions to the .mdb file for individual users while stillallowing full permissions to the folder.

Note If a user opens a database with exclusive access (by selecting the Exclusive check box in the Open dialog box), record locking is not used; therefore, Microsoft Access does not attempt to open or create an .ldb file. If the database is always opened for exclusive use, a user needs only read and write permissions to the folder.

The .ldb File Contents

For each person who opens a shared database, the Jet database engine writesan entry in the database's .ldb file. The size of each .ldb entry is 64bytes. The first 32 bytes contains the computer name (such as JohnDoe). Thesecond 32 bytes contains the security name (such as Admin). The maximumnumber of concurrent users that the Jet database engine supports is 255;therefore, the .ldb file size is never larger than 16 kilobytes.

Note Although a file-server solution can support up to 255 simultaneous users, if the users of your solution will be frequently adding data and updating data, it is a good idea for an Access file-server solution to support no more than 25 to 50 users.

When a user closes a shared database, the user's entry is not removed fromthe .ldb file. However, it may be overwritten when another user opens thedatabase. This means, you cannot use the .ldb file alone to determine whois currently using the database.

The .ldb File Usage

The Jet database engine uses .ldb file information to prevent users fromwriting data to pages that other users have locked and to determine who hasother pages locked. If the Jet database engine detects a lock conflict withanother user, it reads the .ldb file to get the computer and security nameof the user who has the file or record locked.

In most lock conflict situations, you receive a generic "Write conflict"error message that allows you to save the record, copy it to the Clipboard,or drop the changes you made. In some circumstances, however, you receivethe following error message:
Couldn't lock table <table name>; currently in use by user <security name> on computer <computer name>.

Note The state of the information in the .ldb file has no bearing on the state of the database. If an .ldb file becomes corrupted, everything in the database should still work correctly. However, you may see garbled text instead of user names in any lock conflict messages.
REFERENCES
For additional information about the .ldb file and extended byterange locks described in the Jet Locking white paper, click the article number below to view the article in the Microsoft Knowledge Base:
176670 ACC: Microsoft Jet Utilities Available in Download Center
inf
Properties

Article ID: 136128 - Last Review: 01/19/2007 13:31:28 - Revision: 4.2

  • Microsoft Access 95 Standard Edition
  • Microsoft Access 97 Standard Edition
  • kbhowto kbusage KB136128
Feedback