
🚀 Overview: Troubleshooting the “File Sharing Lock Count Exceeded” Error
In high-demand multi-user environments, Microsoft Access may encounter a threshold limitation when processing exceptionally large transactions. This manifests as the error: “File sharing lock count exceeded. Increase MaxLocksPerFile registry entry.”
This issue typically surfaces when the Microsoft Access Connectivity Engine (ACE) or the older Jet database engine attempts to place more locks on a file than the system’s current configuration allows. By default, this limit is set to 9,500 locks. When a single transaction—such as a massive bulk update or a complex delete query—requires more than this allocated amount, the operation fails to maintain data integrity, and the transaction is rolled back.
⚙️ Key Technical Details
To resolve this bottleneck, IT Administrators must increase the MaxLocksPerFile value. This can be achieved through a persistent system-wide registry modification or a temporary session-based programmatic override.
🛡️ Method 1: Registry Modification (Persistent)
Updating the Windows Registry changes the default behavior for all applications utilizing the Access Connectivity Engine on the machine.
Warning: Always back up the registry before making changes. Incorrect edits can cause significant system instability.
- Step 1: Open the Registry Editor (
regedit.exe). - Step 2: Navigate to the path corresponding to your specific Office installation type and architecture:
Windows Installer (MSI) Installations
- 32-bit Access on 32-bit Windows / 64-bit Access on 64-bit Windows:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\<x.0>\Access Connectivity Engine\Engines\ACE - 32-bit Access on 64-bit Windows (WoW64):
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\<x.0>\Access Connectivity Engine\Engines\ACE
Click-to-Run (C2R) Installations
- 32-bit Access on 32-bit Windows / 64-bit Access on 64-bit Windows:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Microsoft\Office\<x.0>\Access Connectivity Engine\Engines\ACE - 32-bit Access on 64-bit Windows (WoW64):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\<x.0>\Access Connectivity Engine\Engines\ACE
Note: Replace
<x.0>with your version: 16.0 for Microsoft 365, Access 2021, 2019, and 2016; or 15.0 for Access 2013.
- Step 3: Locate the
MaxLocksPerFileDWORD value. - Step 4: Switch the base to Decimal and increase the value (e.g., to 15,000 or higher depending on transaction size).
💻 Method 2: VBA SetOption (Temporary)
If you prefer not to alter the registry globally, you can adjust the lock limit for a specific database session using Visual Basic for Applications (VBA). This requires a reference to the Microsoft DAO 3.6 Object Library.
- Open the Access database and press ALT+F11.
- In the Immediate Window (CTRL+G), execute the following command:
DAO.DBEngine.SetOption dbmaxlocksperfile,15000
This change remains active only for the duration of the current DBEngine session and will revert to the registry default once the application is closed.
⚠️ Impact on Users and Administrators
- Data Reliability: If this limit is hit, large-scale data operations will fail mid-way. For admins, this means ensuring that maintenance scripts or power-user queries are supported by a high enough lock count.
- Environment Constraints: If your environment utilizes Novell NetWare servers, do not exceed 10,000 for this value. NetWare imposes a hard limit of 10,000 record locks per connection; exceeding this in the registry will result in server-level errors.
- Multi-User Scaling: In environments where many users are writing to the same backend database simultaneously, increasing the lock count prevents individual “heavy” users from crashing their own sessions, though it does not replace the need for optimized query design.
📅 Last Technical Review: June 2025
Official Source: Read the full article on Microsoft.com
