How to Fix Access Database Ghost Connections & Delete LACCDB Lock Files
Question details
Users are unable to compact and repair an Access database because a stale lock file indicates the database is still in use.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Attempting to perform a compact and repair operation on an Access database after a system crash or unexpected closure.
- Observed behavior
- The compact and repair process fails and blocks access, falsely reporting that the database is actively in use due to a lingering LACCDB file or ghost connection.
Before attempting to delete any database files manually, verify that no other network users are currently connected to the shared database.
End Background Processes and Remove the LACCDB Lock File
Forcefully close any stuck Microsoft Access background processes to release the database lock, which then allows you to safely delete the stale LACCDB file.
When Microsoft Access crashes or closes unexpectedly, it often leaves behind a ghost connection running in the background. This process keeps the lock file (.laccdb) active, preventing database recovery tasks.
Right-click on your Windows taskbar at the bottom of the screen and select Task Manager from the context menu.
Under the Processes tab, scroll down to locate 'Microsoft Access'. Right-click the process and choose 'End Task' to terminate any ghost connections.
Open File Explorer and navigate to the local or network folder where your Access database file (.accdb) is stored.
Find the associated lock file that has the exact same name as your database but with a .laccdb extension. Right-click the file and select 'Delete'.
Reopen Microsoft Access, load your database, and run the 'Compact and Repair Database' utility from the Database Tools ribbon.

Looking for a Lightweight, High-Performance Office Alternative?
While WPS Office does not include a relational database app like Access, it is an exceptionally lightweight, powerful, and free alternative to Microsoft Office for all your documents, spreadsheets, and presentation needs.
- 1. Download WPS Office: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install the Suite: Run the installer and follow the simple on-screen instructions to set up WPS Office on your computer.
- 3. Open Your Office Files: Launch WPS Office and directly open your existing Microsoft Office files with perfect formatting compatibility.

Frequently Asked Questions
What is an LACCDB file in Microsoft Access?
An LACCDB file is a record-locking information file created automatically when you open an Access database (.accdb). It tracks which users have the database open to prevent data conflicts from simultaneous edits.
Why does Compact and Repair fail when the lock file is present?
The Compact and Repair utility requires exclusive access to the entire database. If an LACCDB file exists, Access assumes another user or a ghost connection is actively using the database, thus blocking the repair operation to prevent corruption.
Is it completely safe to delete an LACCDB file?
Yes, it is perfectly safe to delete the LACCDB file as long as you have confirmed that no users or background processes are actively connected to the database. Access will automatically generate a fresh lock file the next time the database is opened normally.
How can I prevent ghost connections in the future?
Ghost connections typically occur due to network interruptions, power loss, or forced application closures. To minimize them, ensure users close the database properly via the 'Close' button rather than forcing a PC shutdown, and maintain stable network connections.




