Locked Recrod / Killing a Process
Posted in 1999
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Jobs, Consulting & Announcements
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
The following sql will show all locks that have another process waiting on
them. Then run the onmode -z sid command on the offending session.
select l.dbsname, l.tabname, l.type, s.username,
l.owner sid, l.waiter, s2.username
from syslocks l, syssessions s, syssessions s2
where s.sid = l.owner and l.waiter = s2.sid
John Leipold wrote:
> 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