Re: Couple -O- Oddities...
Posted in 1992
In article <8849@emory.mathcs.emory.edu> la4gen!villy@uunet.UU.NET (Will Hartung - Master Rallyeist) writes: > [program details omitted] Turned out > to be a locking problem (they would run several of things at the same time). > > I added a "SET LOCK MODE TO WAIT", in hopes that it would solve the locking > problem during the updates. It has, mostly. We still seem to be seeing > locking problems, even with the LOCK MODE WAIT. Does that make any sense? Even after you SET LOCK MODE TO WAIT you can still get return numbers in SQLCA.SQLCODE which indicate a lock conflict. Basically this happens when the engine thinks that waiting could never resolve the conflict. In order to know what causes this you must capture and analyze the so-called ISAM error code, 2nd element of SQLERRD. This will help you distinguish between such problems as: * deadlock detected * no locks available/lock table full * timeout, deadlock inferred (distributed only) * file error creating a .lck file (on a few systems) > Does the LOCK MODE WAIT time out? It's an explicit option with OnLine, but if you didn't ask for it, it only happens in I-STAR, when you can't obtain a lock in a different database server in a reasonable time and the engine infers there is or may be a deadlock across multiple servers. This is revealed by the ISAM error code.