This is a discussion on RE: Manually Unlocking records in IDS within the Informix forums, part of the Database Server Software category; --> I identify the session that is holding the locks in question and do an "onmode -z" on that session. ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I identify the session that is holding the locks in question and do an "onmode -z" on that session. To identify the session: 1) run dbaccess and set lock mode to wait indefinately 2) from that dbaccess session do a select on the data which is locked, dbacces should hang waiting for the lock 3) from another dbaccess session execute the following against the sysmaster database: select dbsname, b.tabname, rowidr, keynum, e.txt type, d.sid owner, hex(d.address) ownrstcb, g.username ownname, j.pid ownpid, f.sid waiter, hex(f.address) waitrstcb, h.username waitname, i.pid waitpid from syslcktab a, systabnames b, systxptab c, sysrstcb d, sysscblst g, flags_text e, sysrstcb f , sysscblst h, syssessions i, syssessions j where a.partnum = b.partnum and a.owner = c.address and c.owner = d.address and a.wtlist = f.address and d.sid = g.sid and e.tabname = 'syslcktab' and e.flags = a.type and f.sid = h.sid and h.sid = i.sid and d.sid = j.sid into temp A; select tabname[1,18], type[1,4], owner, ownname[1,8], waiter, waitname[1,8] from A; This will return something like the following: Database selected. 1 row(s) retrieved into temp table. tabname type owner ownname waiter waitname trig_fodrstat_03 X 2497368 jcatadm 2497416 jcatadm 1 row(s) retrieved. Database closed. Your dbaccess session waiting for the lock will be the "waiter". The "owner" is the session holding the lock you want to remove. onmode -z that session. In the output above that would be: onmode -z 2497368 HTH, Bill > -----Original Message----- > From: owner-informix-list@iiug.org [SMTP > On Behalf Of JoeT > Sent: Thursday, June 30, 2005 11:21 AM > To: informix-list@iiug.org > Subject: Manually Unlocking records in IDS > > Hi... > > I have a PHP application under development and have an annoying > problem. > > I am purposely trying to kill the code (testing) and sometimes when I > trap an error, I'm getting codes bad of 244 and 107, saying that a > record is locked. I can't do anything in dbaccess either. > > What's the proper way to kill the locked record without restarting the > server? > > Thanks, > Joe > sending to informix-list |