Question Locked

Opportunistic File Locking

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am trying to figure out opportunistic file locking. I work for a company that is running an older app in visual basic and the vendor says that each work station must have opportunistic file locking turned off. I think I turned it off on the server but the vendor swears that is not good enough. I've read the article here: http://support.microsoft.com/kb/296264 but am still confused. Is there an easy one step answer? I'm running the clients in a mixed environment of 2000/xp and the server is server 2003 r2. Thanks.

5 replies

by Member 25348569

You can tell workstations not to ask for it and you can tell servers (or workstations sharing files) not to do it if anything asks for it.

You can disable opportunistic locking requests from workstations by setting the following registry entry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters\

OplocksDisabled REG_DWORD set to 1

Deny the granting of opportunistic lock requests on servers by setting the following registry entry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\

EnableOplocks REG_DWORD 0

If in doubt, setting both on everything wont do any harm!

:)

by kmyers

I thought it was strange after researching that I would have to set it on the local clients. If the server isn't handling requests what difference would the client make? Oh well, I set the client too since you said it wouldn't hurt. Thanks for separating them like you did. I'm now clear on which is the client reg entry and which one is the server. I wasn't 100% after reading the MS article. Stupid I know but hey.

by kenone

I had to turn it off on the server but I never had to do workstations. Do both registry entries even exist on a ws? I would think that you would just have to set oplocksdisabled on a ws but I'm not sure. First you should check to see if both entries exist in a ws registry.

by Member 25348569

then just create them. Although one setting is for WS, the other for servers, the server one would need setting on a WS if it was sharing files where opportunistic locking might be an issue. The setting applies to the server service.

:)

This discussion is closed to new replies.