Good script in the "Informix Database Administrator's Survival Guide"
from Joe Lumbley.
ISBN 0-13-124314-4
Book somewhat dated as it was written for 5.x database software.
See listlocks or something like that
-----Original Message-----
From: Richard Spitz [mailto:Richard.Spitz@ana.med.uni-muenchen.de]
Sent: Friday, May 26, 2000 2:03 AM
To: informix-list@iiug.org
Subject: Re: Need Help Determining Locks
"Art S. Kagel" wrote:
> The onstat utility:
> onstat -k shows locks. The tblsnum column shows the partnum of the table> on which the lock is being held. Look for type X (exclusive) locks first
> then if none look for type S (shared) locks. The owner column value will
> correspond to the address column in the onstat -u report which will give
> you the session id. Then onstat -g ses <sesid> will give you pid, user,
> database, current and last SQL, client host, etc.
Art,
thanks for reiterating on this subject. This question seems to be
coming up quite frequently, and it is indeed a common problem for
DBAs everywhere.
I wonder why it has to be so complicated to get to the relevant
information, going through several consecutive "onstat" commands.
Has anyone already written a script or some other solution that will
deliver the information through a single command only?
Regards, Richard
--
+----------------------------+---------------------------------------+
| Dr. med Richard Spitz | E-Mail: spitz@ana.med.uni-muenchen.de |
| EDV-Gruppe Anaesthesie | Tel : +49-89-7095-6110 |
| Klinikum der Univ. M'nchen | FAX : +49-89-7095-6420 |
| 81366 Munich, Germany | GSM : +49-172-8933578 |
+----------------------------+---------------------------------------+