OP-locks and Server 2022 with TPS files Someone gave a suggestion might this work?

I am moving from 2008 R2 to a new 2022 server. I remember that we needed to turn off op-locks because we have topspeed tables. To do that on the new servers would require turning on SMB1. Not recommended because of security risks.

So I reached out to Experts Exchange here was their recommendation:

OPLOCKS was a feature of SMB1. For SMB2 and 3, it’s called leasing, and here’s how to turn it off:

Click Windows Start Press the Windows keyand then type Command. Right-click on Command Prompt and choose Run as administrator.

Copy and paste the following commands into the command prompt window:

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

NET STOP SERVER

NET START SERVER

Close the command prompt window.

Has anyone already done this for TPS files? Does it indeed work?

The other thing I did was to turn off file caching on the one drive we are putting our older ISAM databases on.

Hopefully this will only be necessary for a short time as I am in the process of converting their older stuff to SQL.

Thanks in Advance!!

I have a 20 year old utility called FixOLandRC. OL is “OpLocks”, and I can’t quite recall what RC stands for. Resource Contention? However, I’ve not used it for at least 5 years.

More recently, I’ve used oplock.sbi within Lindersoft’s SetupBuilder. That’s probably a better approach.

More recently, I’ve used oplock.sbi within Lindersoft’s SetupBuilder.

That doesn’t seem to be a standard include file in the SetupBuilder installation, Mike.
Perhaps it’s a utility you wrote?

I believe it’s something that Friedrich provided. Mine is from 12 years ago, so there may be a newer version. It’s probably best to reach out to him and ask. :slight_smile:

Academic for me, Mike. I don’t use TPS on servers anymore.

You could look in the SBI he gave you. I’d guess it’s registry settings.

Yup, registry stuff. Here’s the most applicable part:

I popped your image into another tab, Mike.
One thing I do see in the bottom quarter of the image is the disabling of SMB 2.0.
Presumably now one would also need to disable SMB 3 if one were to go back to the world of disabling oplocks.
(I don’t think it would be polite to disable those silently on somebody’s server.)

Again, I haven’t had to keep up with oplocks. Possibly interesting the “DisableLeasing” approach described in the original post in this thread? SMB2, SMB3 and Opportunistic Locking

Yeah, it’s definitely a very heavy-handed solution, just for the sake of continuing with TPS files. Moving to SQL is definitely the preferred solution. :slight_smile:

I will be converting most of these tables to SQL, mySQL, or Oracle in the near future. Still weighing out all three. The thing is some of the vendors that make enhancements for Clarion ship their software with TPS files. I guess when the time comes I’ll have to approach the vendors about this.

In the mean time I am going to take OPlocks into consideration as I am setting up this server. I am responsible for installing the new in house server. I also wrote the software they are currently using for their accounting, billing, and inventory systems.

Pretty much makes me responsible for everything.

49 years and still coding and setting up networks. Love this profession!

1 Like

Thanks so much for this article. I was getting uncomfortable about disabling the leasing mode. Now I’m OK with it.

Have a decent look at postgresql as well. Has nice features and the price is right.