Hello,
I've had a major .mdb corruption in production, and I can't go back to prod until I've succeeded in reproducing & fixing it. Problem is, I can't reproduce it.
Here is my prod setup:
- 20 users using MS Access 2013 on windows 7, with a single shared data.mdb on a file server (windows server 2008). Frontend is distributed on each workstation.
- One Tomcat 7 instance running on the same windows server 2008 file server, using hibernate 4.3.4 on top of HXTT 5.1.196, connection props are "lockType=ACCESS;delayedClose=10;" (and with a Connection Pool). It uses the same data.mdb file.
After around 45 minutes of work with no problem, I got this error:
java.sql.SQLException: Failed to go Rowid 004E6508 of table tb-valeur:A corrupted data page 22645
at com.hxtt.global.SQLState.setNextException(Unknown Source)
at com.hxtt.sql.access.a3.a(Unknown Source)
at com.hxtt.sql.r.a(Unknown Source)
at com.hxtt.sql.z.a(Unknown Source)
at com.hxtt.sql.z.a(Unknown Source)
at com.hxtt.sql.ce.y(Unknown Source)
at com.hxtt.sql.d4.a(Unknown Source)
at com.hxtt.sql.d4.a(Unknown Source)
at com.hxtt.sql.d4.a(Unknown Source)
at com.hxtt.sql.b0.a(Unknown Source)
at com.hxtt.sql.b0.a(Unknown Source)
at com.hxtt.sql.b0.a(Unknown Source)
at com.hxtt.sql.am.a(Unknown Source)
at com.hxtt.sql.d6.executeQuery(Unknown Source)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:80)
After that, the db was completely corrupted. It looked like data had been written totally at the wrong place; the file was 20% smaller. We had to stop all users, retrieve a backup and start over.
At the time of the error, Tomcat wasn't writing to the .mdb, but one access client was. However, it must be noted that the Access program has been working for years without any corruption.
To reproduce this problem, I tried to stress the systems to absurd levels from 6 different workstations at the same time, attacking the .mdb from scripts, clients and through tomcat, but I couldn't get a single instance of database corruption! At worse, Tomcat would be painfully slow, or even unusable, but never a corruption.
I'm at my wits' ends; maybe you can help me find a way to explain this problem.
Thanks,
Patrick
|
How to turn off opportunistic locking in windows on client and on server side? This is done by manipulating the following registry key:
For client side: oplocks.reg file
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MRXSmb\Parameters]
"OplocksDisabled"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"UseOpportunisticLocking"=dword:00000000
For server side: oplocksServer.reg
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters]
"EnableOplocks"=dword:00000000
You should put additional registry entry like e.g.
The following registry entries disable opportunistic locking and caching:
HKey_Local_Machine \ System \ CurrentControlSet \ Services \ LanmanServer \ Parameters \ EnableOpLocks must be set to 0.
HKey_Local_Machine \ System \ CurrentControlSet \ Services \ LanmanServer \ Parameters \ CachedOpenLimit must be set to 0.
HKey_Local_Machine \ System \ CurrentControlSet \ Services \ LanmanWorkStation \ Parameters \ UseOpportunisticLocking must be set to 0.
HKey_Local_Machine \ System \ CurrentControlSet \ Services \ LanmanWorkStation \ Parameters \ UtilizeNtCaching must be set to 0.
|