Home > Go Live Procedures > Windows > How to Disable Oplocks

How to Disable Oplocks

All screens below are shown from a Windows 7 PC. Other versions of Windows may not look exactly the same, but should be similar enough.

 

Windows networks support a feature called “opportunistic locking” which provides some performance benefits when sharing small document files. With QuickFill’s database, this feature provides very little benefit. What is worse, it can lead to data corruption, especially on busy networks. If you search the internet for the phrase “opportunistic locking,” you will find that we are not alone in this opinion.

 

To avoid data corruption, you must disable the opportunistic locking feature by making changes to the registry of the file server and the workstations that access the QuickFill database. If you have followed the standard QuickFill installation procedures, the installer will have made these changes for you.

 

File Server

 

This applies to all Windows file servers, except where Windows 98 is used as a “server.” Run the registry editor by clicking the Start menu and clicking Run. In the Run box, enter “REGEDIT.” Expand the HKEY_LOCAL_MACHINE tree, then System, CurrentControlSet, Services, LanmanServer, and Parameters.

 

With the Parameters key/folder highlighted in the left hand pane, select New/DWord value from the Edit menu and enter “EnableOplocks” (exactly as shown) then press Enter. Verify that the entry you just made has a data value of 0x00000000.

 

Note: The above registry change should be made on the computer that stores your database (that is, the server). If you sometimes copy your database to another computer on the network and use it there as well, you must also make the above registry change on that computer.

 

Workstation

 

Windows NT

Run the registry editor by clicking the Start menu and clicking Run. In the Run box, enter “REGEDIT.” Expand the HKEY_LOCAL_MACHINE tree, then System, CurrentControlSet, Services, LanmanWorkstation, and Parameters.

 

With the Parameters key/folder highlighted in the left hand pane, select New/DWord value from the Edit menu and enter “UseOpportunisticLocking” (exactly as shown), press Enter, then select Modify from the Edit menu, enter “0” for the Value data, and click on “OK”. Verify that the entry you just made has a data value of 0x00000000.

 

 

 

 

Windows 2000/XP

Run the registry editor by clicking the Start menu and clicking Run. In the Run box, enter “REGEDIT.” Expand the HKEY_LOCAL_MACHINE tree, then System, CurrentControlSet, Services, mrxsmb, and Parameters.

 

With the Parameters key/folder highlighted in the left hand pane, select New/DWord value from the Edit menu and enter “OplocksDisabled” (exactly as shown) press Enter, then select Modify from the Edit menu, enter “1” for the Value data, and click on “OK”. Verify that the entry you just made has a data value of 0x00000001.

 

 

 

 

 

Windows Vista/Windows 7

Run the registry editor by clicking the Start menu and entering “REGEDIT” in the “Search programs and files” and press enter. Windows will ask for your permission to proceed. Click Yes to continue. Expand the HKEY_LOCAL_MACHINE tree, then System, CurrentControlSet, Services, and mrxsmb. If there is no “Parameters” key under mrxsmb, then select mrxsmb and choose New/Key from the Edit menu. Enter “Parameters” as the key name.

 

 

With the Parameters key/folder highlighted in the left hand pane, select New/DWord value from the Edit menu and enter “OplocksDisabled”, exactly as shown, press Enter, then select Modify from the Edit menu, enter “1” for the Value data, and click on “OK”. Verify that the entry you just made has a data value of 0x00000001.

 

 

 

 

Make sure you reboot the server and all workstations to complete this process.

 

These registry changes are documented by Microsoft at these locations:

 

For Windows NT:

http://support.microsoft.com/support/kb/articles/Q129/2/02.asp

 

For Windows 2000, XP, 2003 and Vista:

http://support.microsoft.com/support/kb/articles/Q296/2/64.asp

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin