RE: Locked record
Posted in 1998
Topics: Stored Procedures & SPL, Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL, Transactions, Locking & Isolation
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------ =_NextPart_001_01BDD1CF.A3C14B12
Content-Type: text/plain
We had a similar situation. It turned out that our tables in question
were set to PAGE level locking. After we changed them to ROW level
locking, the problem was resolved. I tried the "set lock mode to wait"
in the SQL and it didn't work in our case. Hope this helps.
Kathy Hildebrand
kathy@htscm.com <mailto:kathy@htscm.com>
:-)
Designer/Programmer
-----Original Message-----
From: Richard Thomas [SMTP:Richard.Thomas@yes.optus.com.au]
Sent: Thursday, August 27, 1998 4:08 AM
To: informix-list@iiug.org; 'Marek Miloszewski'
Subject: RE: Locked record
Marek,
Try putting a SET LOCK MODE TO WAIT n ; statement in the 4GL.
The
problem is that the index-row (and the row itself) is locked for
the
term of the transaction that your second user is performing. If
the 4GL
doesn't do any updating, (ie if it's just a report), try adding
a SET
ISOLATION TO DIRTY READ to it (if that isolation level is
appropriate to
your application).
You could also try changing the LOCK MODE of the offending table
to ROW,
but I don't think that is your problem here. It looks to me
like the
index is being read by the 4GL, and crashing when it encounters
a lock
held by another user.
cheers
RET
> ----------
> From: Marek Miloszewski
> Sent: Thursday, 27 August 1998 6:39 PM
> To: informix-list@iiug.org
> Subject: Locked record
>
> Hi all,
>
> we have a problem with one of our application. Sometimes when
somebody
> is
> inserting new record into one of the tables, other person has
a
> problem with
> entering the application. Here is a message displayed:
>
> Program stopped at "function.4gl", line number 166.
> SQL statement error number -244.
> Could not do a physical-order read to fetch next row.
> SYSTEM error number -107.
> ISAM error: record is locked. >
> The problem is that it does not happened continuously. One day
yes,
> another
> not. Our application producer said this is problem with our
Informix
> configuration. But other programs work properly! I don't know
were to
> look
> for error...
>
> Any suggestions?
>
> Marek
>
> -------------------------------------------------------------
> Zaklad Energetyczny Szczecin SA
> ul. Malczewskiego 5/7, 70-952 Szczecin, Poland
> tel: (48 91) 424.00.71 w.5216, fax: (48 91) 22.56.28
> marek.miloszewski@zes.szczecin.pl
> -------------------------------------------------------------
> memorek@polbox.com
> http://www.polbox.com/m/memorek
> -------------------------------------------------------------
>
------ =_NextPart_001_01BDD1CF.A3C14B12
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUS-ASCII">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.1960.3">
<TITLE>RE: Locked record</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2 FACE=3D"Arial">We had a similar situation. It =
turned out that our tables in question were set to PAGE level =
locking. After we changed them to ROW level locking, the problem =
was resolved. I tried the "set lock mode to wait" in =
the SQL and it didn't work in our case. Hope this =
helps.</FONT></P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Kathy Hildebrand</FONT>
<BR><A HREF=3D"mailto:kathy%40htscm.com"><U><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">kathy@htscm.com</FONT></U></A>
<BR> <FONT FACE=3D"Wingdings" =
SIZE=3D2>J</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Designer/Programmer</FONT>
</P>
<UL>
<P><A NAME=3D"_MailData"><FONT SIZE=3D2 FACE=3D"Arial">-----Original =
Message-----</FONT></A>
<BR><B><FONT SIZE=3D2 FACE=3D"Arial">From: Richard Thomas =
[SMTP:Richard.Thomas@yes.optus.com.au]</FONT></B>
<BR><B><FONT SIZE=3D2 FACE=3D"Arial">Sent: </FONT></B> <FONT =
SIZE=3D2 FACE=3D"Arial">Thursday, August 27, 1998 4:08 AM</FONT>
<BR><B><FONT SIZE=3D2 =
FACE=3D"Arial">To: </FONT></B> <FONT SIZE=3D2 =
FACE=3D"Arial">informix-list@iiug.org; 'Marek Miloszewski'</FONT>
<BR><B><FONT SIZE=3D2 =
FACE=3D"Arial">Subject: </FONT>=
</B> <FONT SIZE=3D2 FACE=3D"Arial">RE: Locked record</FONT>
</P>
<P><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">Marek,</FONT>
</P>
<P><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">Try putting a SET =
LOCK MODE TO WAIT n ; statement in the 4GL. The</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">problem is that the =
index-row (and the row itself) is locked for the</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">term of the =
transaction that your second user is performing. If the =
4GL</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">doesn't do any =
updating, (ie if it's just a report), try adding a SET</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">ISOLATION TO DIRTY =
READ to it (if that isolation level is appropriate to</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">your =
application).</FONT>
</P>
<P><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">You could also try =
changing the LOCK MODE of the offending table to ROW,</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">but I don't think =
that is your problem here. It looks to me like the</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">index is being read =
by the 4GL, and crashing when it encounters a lock</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">held by another =
user.</FONT>
</P>
<P><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">cheers</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">RET</FONT>
</P>
<P><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">> =
----------</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">> From: =
Marek Miloszewski</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">> Sent: =
Thursday, 27 August 1998 =
6:39 PM</FONT>
<BR><FONT COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">> To: =
informix-list@iiug.org</FONT>
<BR><FONT COLOR=3D"#000000@@DQ