Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Anil Menon asked how to list and kill locks on IDS 9.4UC4 on Linux, as procedures sometimes left tables locked. Keith Simmons said locks free when the holder ends. Juan Galanzini suggested querying syslocks. Martin Fuerderer explained onstat -k shows locks, tblsnum maps to systables.partnum, locks cannot be killed, but the owning session can be found via onstat -u and ended with onmode -z.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Hi All,
What is the easiest way to list down all the locks and kill them (
particular lock ) .
I have some procedures which locks a tables. Sometimes these procedures
break causing the tables to be locked. We are trying to find out which
procedures are actually causing the problem.
I use IDS 9.4UC4 on linux.
Thanks in advance.
--
Anil Menon
x MIS Team.
I'll try till I die or die trying.
Anil
If you are talking about internal row/index/table locks, once the holding
process has been removed/deleted then the lock will be released. If however
you have 'soft' application locking then you will need to write some SQL to
identify this within your application and then reset them.
Keith
-> -----Original Message-----
-> From: Anil Menon [mailto:anil@rhythm.com]
-> Sent: Wednesday, March 09, 2005 9:36 AM
-> To: ids@iiug.org
-> Subject: unlocking locks [4447]
->
->
-> Hi All,
-> What is the easiest way to list down all the locks and kill them (
-> particular lock ) .
-> I have some procedures which locks a tables. Sometimes these
-> procedures
-> break causing the tables to be locked. We are trying to find
-> out which
-> procedures are actually causing the problem.
->
-> I use IDS 9.4UC4 on linux.
->
-> Thanks in advance.
->
-> --
-> Anil Menon
-> x MIS Team.
->
-> I'll try till I die or die trying.
->
->
********************************************************************************
**
This message is sent in strict confidence for the addressee only. It may
contain legally privileged information. The contents are not to be disclosed
to anyone other than the addressee. Unauthorised recipients are requested
to preserve this confidentiality and to advise the sender immediately of any
error in transmission.
This footnote also confirms that this email message has been swept for the
presence of computer viruses, however we cannot guarantee that this message
is free from such problems.
********************************************************************************
**
Hi,
"onstat -k" lists all the locks.
Check the manual "Admin's Reference Guide" for
more info. The tablespace number (tblsnum) is the
partnum of the table in the respective database.
So being connected to the respective database
you can do something like
SELECT * FROM systables WHERE partnum=<tblsnum from onstat -k>;
to find out, which table is affected by the lock.
Unfortunately there is no way to "kill" a lock.
Locks are held by sessions. Unless the session is
releasing the lock by itself it can't be "taken away" from
outside.
However, you can kill the session which then will release
the lock ...
You find the session number via the "owner" column in "onstat -k"
output. Look for this owner in output of "onstat -u" which will give you
the session id, which you can then use for "onstat -g ses <session id>"
or "onmode -z <session id>" (the latter kills the session).
Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
forum.subscriber@iiug.org wrote on 09.03.2005 10:36:18:
> Hi All,
> What is the easiest way to list down all the locks and kill them (
> particular lock ) .
> I have some procedures which locks a tables. Sometimes these procedures
> break causing the tables to be locked. We are trying to find out which
> procedures are actually causing the problem.
>
> I use IDS 9.4UC4 on linux.
>
> Thanks in advance.
>
> --
> Anil Menon
> x MIS Team.
>
> I'll try till I die or die trying.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.