OpLocks when server IS the client RRS feed

  • Question

  • We have been running all Visual Foxpro 9 apps (clients) via Terminal Services on Windows 2003 Servers.  The VFP tables themselves are also stored on a Windows 2003 Server.

    Everything was fine until I ran an app on a new Windows 2008 server. We are going to use these new 2008 servers as new terminal servers (and we will move VFP tables to a 2008 server also).

    There are not currently any registry entries on any of the 2003 servers for OpLocksDisabled, EnableOplocks, or SMB2 (of course).  And when I ran the app that caused the problem, none of those registry changes were made.

    The app I ran on the 2008 server runs every minutes and has many read/writes of VFP data.  Within minutes of running this app on the 2008 server, I saw problems in the VFP table that gets written to.  For example, 6 existing records had a field value set to the same value of a newly added record.  Neither the table nor indexes got corrupted. 

    I now know that for Server 2008 I need to edit the registry and set OpLocksDisabled = 1 on the clients and EnableOplocks = 0 and SMB2 = 0 on the server that will host the data.  I have two questions:

    1) Since the clients are 2008 servers (terminal servers, where do I set OpLocksDisabled?  There is not an HKLM.Sysytem.CurrentControlSet.Service.mrxsmb.Parameters location in which to add this entry.

    2) Does the problem I described sound like it was related to the OpLocks issue? I'm skeptical that this was the issue because I didn't move the data files from Server 2003 computer.  I only ran client on Server 2008.

    Friday, March 16, 2012 12:20 PM


  • See This article:

    Configuring opportunistic locking in Windows


    • The opportunistic locking registry keys are valid only for traditional SMB (SMB1). You cannot turn off opportunistic locking for SMB2. SMB2 was introduced in Windows Vista to enable faster communication between computer that are running Windows Vista and Windows Server 2008 or Windows Server 2008 R2.

    So you will not able to turn off oplocks for SMB2.

    As the issue seems related to Visual Foxpro, you may also have a try to post a thread to following forum to see if there is any known solution:

    Visual FoxPro General


    TechNet Subscriber Support in forum |If you have any feedback on our support, please contact tnmff@microsoft.com.

    Tuesday, March 20, 2012 8:42 AM