Unix Technical Forum

RE: Manually Unlocking records in IDS

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. ...


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 08:40 AM
Bill Dare
 
Posts: n/a
Default RE: Manually Unlocking records in IDS


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 [SMTPwner-informix-list@iiug.org]
> 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:37 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com