RE: Need Help Determining Locks
Posted in 2000
Folks,
Depending on your version of Informix syslocks may not return anything. We
are using IDS 7.30 FC7 and data within this view is not available. Informix
has provided us with a patch but we have yet to install it. Informix tech
support has indicated this problem exists across all 7.x versions. I would
be interested in your comments as to the installation/success of said patch.
I'm sure you could take William's script and modify it to include the
underlying tables that make up syslocks. For those not in the know you can
identify the underlying tables in $INFORMIXDIR/sysmaster.sql.
Scott
> -----Original Message-----
> From: William Rice [SMTP:ricew@operamail.com]
> Sent: Friday, May 26, 2000 9:13 AM
> To: informix-list; richard.spitz@ana.med.uni-muenchen.de
> Subject: RE: Need Help Determining Locks
>
> Well lazy bums like me use
>
> database sysmaster;> 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;
>
> in dbaccess.
>
> Hope this helps,
> Will
>
> >===== Original Message From richard.spitz@ana.med.uni-muenchen.de =====
> >"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 |
> >+----------------------------+---------------------------------------+
>
> ------------------------------------------------------------
> This e-mail has been sent to you courtesy of OperaMail, as a free
> service from
> Opera Software, makers of the award-winning Web Browser, Opera. Visit
> us at
> http://www.opera.com/ or our portal at: http://www.myopera.com/ Your free
> e-mail
> account is waiting at: http://www.operamail.com/
> ------------------------------------------------------------