Database Corruption (1 Viewer)

zeroaccess

Active member
Local time
Today, 17:27
Joined
Jan 30, 2020
Messages
671
Hi. Did you see the link I posted earlier about the fix to apply? It should have told you how to disable leasing, which is exactly what zeroaccess also posted.
Try the other methods in DBguy's linked post first.
 

kitty77

Registered User.
Local time
Today, 18:27
Joined
May 27, 2019
Messages
710
Sorry, I missed that. Will give it a try. Has anyone else tried it?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:27
Joined
Feb 28, 2001
Messages
27,147
The word "Leasing" in the context of a network probably has something to do with DHCP leasing. Dynamic Host Control Protocol is what is used in a fairly common and somewhat specific situation: You have a router that handles some small number of connections that are going to be given local IP addresses dynamically through DHCP. These putative lease-seeking devices have no permanent address but DO have the ability to adopt an address granted via DHCP transactions.

Your router's sub-net can only contain / manage a limited number of addresses as determined by the sub-net mask. For most home routers, your ISP grants 250 addresses and that becomes the maximum number of devices that can take out a lease. If you have 251 devices, "last one in" loses because there are no leases left. Commercial and business routers can have more or fewer addresses to manage depending on what "class" of router was purchased and how the network mask was set. While it isn't a requirement, lease sizes are often integer powers of two.

Using UDP (datagram protocol), devices on the sub-net request an address from the range "held" by the sub-net router. If that router has a free lease, it issues it to the requesting computer. That lease temporarily assigns a network IP address within the sub-net range of the router. Since routers perform Network Address Translation most of the time anyway, your computer's actual IP address almost doesn't matter because only the sub-net ever sees it. What matters is that through NAT, your session's traffic doesn't get mixed up with traffic from other sessions on the same router.

The concept of "leasing" in the context of database corruption comes up like this: To prevent "lease hoarding," leases have lifetimes - typically 24 hours but anything is possible from several hours to several days. At the end of the lease's lifetime, the lease and the IP address get reclaimed.

Here is the significant part. If the leased IP address was busy at the time, dropping the lease drops the connection. For Access databases, being on a leased IP that suddenly loses its lease is pretty catastrophic, and it is in that context that I think the earlier referenced article is talking about leasing. Disabling "leasing" means that once you have an address, you hold it until you actually break the session. It doesn't time out. This mode of operation on a DHCP sub-net avoids the ugliness of dropped network connections but exchanges that ugliness for the problem that if you actually lose your network connection by physical failure, the router won't get the signal to release the address. So they are subject to accidents that cause address losses until you restart the router.
 

kitty77

Registered User.
Local time
Today, 18:27
Joined
May 27, 2019
Messages
710
Thanks for the info. Sure seems to be a network issue here. Is using static IP's more advantageous than DHCP?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:27
Joined
Feb 28, 2001
Messages
27,147
Static IPs require someone to manage them. DHCP just does it behind the scenes. Therefore, DHCP is usually preferred by an IT staff. Less continued work for them. But buggy little things can crop up - like this one - that force intervention in some way or another. I think that eventually the problem noted in the referenced article will be resolved and a patch will come out to make things work better. But testing takes time and this is the kind of test that is hard to force in a lab.
 

kitty77

Registered User.
Local time
Today, 18:27
Joined
May 27, 2019
Messages
710
Got it. But is static IP better than dynamic IP for MS Access. Sounds like it might be better.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:27
Joined
Feb 28, 2001
Messages
27,147
I was in a shop with DHCP with 24-hour leasing and over 40 users of Access, maybe 8-15 simultaneously during prime shift. Never had a problem. I think this is a bad case of buggy software based on a new patch causing a timing problem.

One issue that often cropped up is if someone left their machine on overnight, they might have a network glitch the next morning because their lease had expired. But folks that turned things off at close of business and turned things on again at start of business ALWAYS got new leases with each new day (because of turning off workstations overnight, which timed out the previous leases due to inactivity.)

If your people have the bad habit of leaving machines running overnight, you might be able to help matters yourself by spreading the word (or geting your IT shop to do so) that machines should not be left running overnight unless a known update was scheduled.
 

zeroaccess

Active member
Local time
Today, 17:27
Joined
Jan 30, 2020
Messages
671
Everything Doc says is true, however I think we're talking about a different kind of leasing?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:27
Joined
Oct 29, 2018
Messages
21,454
Everything Doc says is true, however I think we're talking about a different kind of leasing?
This is probably more like what Doc was trying to say (I'm just guessing):
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:27
Joined
Feb 28, 2001
Messages
27,147
Ah, a "collision" of the word "leasing." I had indeed forgotten that the new SMBv2 and v3 protocols used the term "leasing." My error. I gave the right answer for the wrong question. My apologies, Kitty77, for the confusion.

Thanks, theDBguy, for the reminder.
 

kitty77

Registered User.
Local time
Today, 18:27
Joined
May 27, 2019
Messages
710
So, it's been three days now since I disabled leasing where the BE is and no corruption!
It's been the longest time so far without corruption too. Thanks for the help.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:27
Joined
Feb 28, 2001
Messages
27,147
Have to say that your result pretty much confirms the source of the problem.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:27
Joined
Oct 29, 2018
Messages
21,454
So, it's been three days now since I disabled leasing where the BE is and no corruption!
It's been the longest time so far without corruption too. Thanks for the help.
Hi. Continued success with your project. Cheers!
 

kitty77

Registered User.
Local time
Today, 18:27
Joined
May 27, 2019
Messages
710
You sent me some instructions some time ago on how to disable leasing. Can you post that again? Can't seem to find it.
Forgot how to apply it?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:27
Joined
Oct 29, 2018
Messages
21,454
You sent me some instructions some time ago on how to disable leasing. Can you post that again? Can't seem to find it.
Forgot how to apply it?
Are you talking about this one?
 

Users who are viewing this thread

Top Bottom