среда, 18 июня 2014 г.

Opportunistic Locking and Read Caching on Microsoft Windows Networks


Disabling Oplocks on Windows Client PCs
To disable oplocks on a Windows client PC (a Windows PC that accesses an embedded database table hosted on another PC), change or add the following Registry values:
  • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters OplocksDisabled = 1

Disabling Oplocks on Windows Servers
To disable oplocks on a Windows server (a Windows PC that hosts an embedded database table accessed from another PC), change or add the following Registry values:
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters EnableOplocks = 0

Disabling Oplocks on SMB2 and SMB3
Oplocks cannot be turned off for SMB2 and SMB3. You can disable SMB2 and SMB3 themselves, how to do so is documented by Microsoft in Knowledge Base article 2696547.
According to that article, SMB2 and SMB3 can be disabled on Windows operating systems that support these.
To disable SMB2 and SMB3 on a Windows Vista, 7, 8, Server 2008 or Server 2012 PC hosting embedded database tables, change or add the following Registry value:
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters SMB2 = 0
Once SMB2 and SMB3 are disabled, SMB1 should be re-enabled to be used again and the methods described above applied to disable oplocks for SMB1.
To re-enable SMB1 on a Windows Vista, 7, 8, Server 2008 or Server 2012 PC hosting embedded database tables, change or add the following Registry value:
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters SMB1 = 1


источник

На клиенте
So, for troubleshooting purposes, mostly in an environment that has mixes operating systems, you might want to consider disabling SMB 2.0. You need to do so on both the “client” and the “server” operating systems. To disable SMB 2.0 for Windows Vista or Windows Server 2008 systems that are the “client” systems run the following commands:
Note there’s an extra ” ” (space) after the “=” sign.
To enable back SMB 2.0 for Windows Vista or Windows Server 2008 systems that are the “client” systems run the following commands:
Again, note there’s an extra ” ” (space) after the “=” sign.

источник