MS Access ldb file

Most users will realise that their Access database is held in a file with an mdb extension but from time to time we get asked about a similar file with the same name as the database but with an ldb extension. What is it? Is it a virus? Is it safe? What should I do with it?

What is it?

[Microsoft Access ldb file in Notepad] The ldb file is harmless and you can see something of its contents with a simple text editor. You won't get far if you open the file with Notepad.

The NotePad++ editor does a better job of interpretting the contents of the file and gives us more of a clue. [Microsoft Access ldb file in Notepad++]

Here we can see the name of our computer and a user name and that's what the ldb file does. It records the names of the people using the database and - although we can't see it by using this simple approach - the file also holds information about the records which are locked by each of the users.

I've no idea why NotePad does not show the contents of the ldb file. WordPad also fails but MS Word and the text editor within Visual FoxPro will both show these names. You might have to experiment with various editors until you find one that will work.

What should I do with it?

For most of the time, the answer is "nothing". Microsoft Access will create the ldb file when the first user opens the database, it will add users' details to the file as more people log in, and it will delete the ldb file when the last person closes the database.

Sometimes an Access database will crash and leave the ldb file behind and sometimes the file will be left in a state indicating that someone still has some records locked. The easiest solution to this situation is to delete the file. Make sure that nobody is using the database before you try to delete the file though.


You won't see an ldb file if a single user has opened the database in exclusive mode. There's no risk of conflict between multiple users in this situation and so there's no need for the file.

A user's entry is not deleted from the ldb file when that user closes the database. This means that you can't simply look at the ldb file to discover who is using the database at this instant. All that you can get is a list of the people who have used the database during this session. This usually means the people who've used it today so the list is still useful when you're investigating a crash because you can use it to identify the people who were the last to have used the system.

The Microsoft Knowledge Base entry 186304 gives details of how to extract more information from the ldb file by writing VBA code.

Access 2007

Note that Access 2007 uses the similar laccdb file when working with its native database format.