RE: Locked Recrod / Killing a Process
Posted in 1999
If you are to lazy to do all the work with onstat -k
I have found this select statement on the sysmaster to work well
select
l.dbsname,
l.tabname,
l.rowidlk,
l.type,
s.sid,
s.username,
s.hostname,
l.waiter,
w.username,
w.hostname
from syslocks l,
syssessions s, outer syssessions w
where
l.owner = s.sid and
l.waiter = w.sid
You can use locktype, tabname and sessions with waiters to narrow down
the session which is causing the problems. The pid/hostname
is good for identifying the culprit if they are running on a unix box.
Will
>===== Original Message From "John Leipold" <jleipold@msn.com> =====
>I currently a 4GL consultant at a site with no DBA.
>
>We are running an Informix 7.2x engine on a Sun machine.
>
>One record was locked in a table today........ The solution was to kick off
>500+ users, shutdown the machine, and restart the database.
>
>Now I am no DBA, but I'm sure that using tools provided under UNIX and
>Informix that you can track down the process that has the lock and ask the
>user to logoff or maybe as a last resort kill the offending process without
>taking 500 users down for 30 minutes. (I have seen ~real~ DBA's do this in
>the past)
>
>I was stunned to find out that even though we have Informix support, the
>thought never occurred to anyone to call and ask if some other solution was
>possible.
>
>I'm not sure if this would change anything but the record locked, was a
>stored procedure entry in the sysprocauth table. I am hesitant to kill
>processes that have anything to do with a system table, event to the
>slightest degree.
>
>Thanks in advance
------------------------------------------------------------
This e-mail has been sent to you courtesy of OperaMail, a
free web-based service from Opera Software, makers of
the award-winning Web Browser - http://www.operasoftware.com
------------------------------------------------------------