We help IT Professionals succeed at work.

SMBLeasing ON?

Medium Priority
51 Views
Last Modified: 2020-03-25
Does anyone know what happens when you re-enable SMBLeasing. It was a fix to stop back end databases going into an inconsistent state when used with Windows 10 and office 365 but apparently it can cause network speed issues. I have a client that can only use one front end out of three. One works perfect but reduces the access speed down to intolerable levels on the other two. I have applied every other fix I can see but problem persists. I just wondered if the fix below would still need the SMBLeasing turned off?

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"FileInfoCacheLifetime"=dword:00000000
"FileNotFoundCacheLifetime"=dword:00000000
"DirectoryCacheLifetime"=dword:00000000
Comment
Watch Question

Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
 I'm not quite sure what the question is here.
Jim.

Author

Commented:
The question is Does the cache change negate the need for SMBLeasing. You said in a previous post that the SMBLeasing would only work when 1 user is in the database. I have 3 using (trying to use) the same data. When one opens access OK the second jambs the first taking 40 seconds to open a simple report. This seams to have happened after we deployed the SMBLeasing fix.

So I guess the question is, what will be the effect of re-establishing it? Will it just revert to putting the database into an inconsistent state
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
<<This seams to have happened after we deployed the SMBLeasing fix. >>
 You have not actually deployed the fix as suggested by Microsoft.   Microsoft's workaround is to disable leasing with:

REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters /v DisableLeasing /t REG_DWORD /d 1 /f

On the server.  What your doing with the above is turning off parts of caching on the client.
 
I'm not sure how that plays into the problem with Access.   There are also other problems in Windows with this:

A known issue in Windows 10, version 1803, affects the ability of Windows 10 to cache large directories. After you upgrade a computer to Windows 10, version 1803, you access a network share that contains thousands of files and folders, and you open a document that is located on that share. During both of these operations, you experience significant delays.
To resolve this issue, install Windows 10, version 1809 or a later version.
To work around this issue, set DirectoryCacheLifetime to 0.

But to answer the question, if you set everything back to normal settings, then yes, you are going to be back to Access DB's corrupting.  Microsoft has not issued a fix for any of the leasing problems.

Jim.

Author

Commented:
Hi Jim

I have disabled SMBLeasing a year ago but we did it on the client side. Should this be undone? should it only be applied on the server. I'm not quite clear
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
I don't know the answer to your question.

Disabling the cache's on the client side is not really disabling leasing.  It may solve some problems, but unless you have inside knowledge from Microsoft, it's hard to say what the ramifications of doing so are as leasing is still running.

The only official workaround that has been given by Microsoft for Access DB's is to disable leasing on the server.

Jim.


Author

Commented:
Hi Jim

When I say I have disabled leasing I mean the official MS workaround not the cache stuff

Author

Commented:
I'm sorry to be so pedantic here but I have a very unhappy client that I am sure is going to tell me what to do with my software any day now.
President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017
Commented:
Understand your predicament.  Access development has become very problematic in recent history and bugs like this make it even more so.   It's hard to get Access apps accepted even with everything working.  I will add that this bug not only effects Access, but any product that uses a shared DB file (Quick Books and other products).

I just re-read the question and your first couple comment and I missed the point of what you were trying to ask.   I think what your asking is if you turn leasing back on on the server, then do this:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"FileInfoCacheLifetime"=dword:00000000
"FileNotFoundCacheLifetime"=dword:00000000
"DirectoryCacheLifetime"=dword:00000000

on the client, will the Access DB's be OK?

Answer is, I don't know.   You'll need to try it.  Microsoft has not been forth coming with details under what conditions the bug is triggered and if a client side disable of certain features of leasing would correct it or not.

If things are that dicey with the client, then I would suggest giving it a try.   That way performance issues would be limited to those using Access.  Everyone else would still have leasing.

An alternative would be if they have an RDS (Remote Desktop Services) aka Terminal Services Server.   Put the back end on there and the users and everything is "local"; leasing doesn't come into play at all then.   Pretty simple if they already have it, might take a little work to setup if they don't.

Jim.
Armen Stein - Microsoft Access MVP since 2006President, J Street Technology
CERTIFIED EXPERT

Commented:
I know you've probably heard this before, but migrating the BE to SQL Server isn't an option?  SQL Server Express is free, and it perform very well if you optimize the Access front-end.
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
@Armen,
He asked that in another question<g>.

Should have been included here though for completeness, so thanks for posting that.

Jim