RE: Need Help Determining Locks
Posted in 2000
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/
------------------------------------------------------------