Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: URGENT - LOCK

RE: URGENT - LOCK

From: Shaw, Glen <Glen.Shaw_at_BellSouth.com>
Date: Fri, 27 Oct 2000 09:13:33 -0400
Message-Id: <10662.120428@fatcity.com>


Kirsten,

This is a script I found on Metalink once. I have made only minor modifications to it. This should give you the information you are looking for.

Hope this helps,
Glen

  select B.SID "SID", C.USERNAME "Schema", C.OSUSER "OS User", C.TERMINAL
"Terminal", C.PROGRAM "Program",

         DECODE(B.ID2, 0, U.NAME || '.' || A.NAME, 'Trans-'||to_char(B.ID1))
"Object Name",

         DECODE(B.TYPE, 'TX','TRANSACTION ROW-LEVEL', 'RT','REDO-LOG', 'TS','TEMPORARY SEGMENT ', 'TD','TABLE LOCK',

                'TM','ROW LOCK', B.TYPE) TYPE, 
         DECODE(B.LMODE,0,'--Waiting--', 1,'Null', 2,'Row Share', 3,'Row
Excl', 4,'Share', 5,'Sha Row Exc', 
                6,'Exclusive', 'Other') "Lock Mode", DECODE(B.REQUEST,0,' ',
1,'Null', 2,'Row Share', 3,'Row Excl', 
                4,'Share', 5,'Sha Row Exc', 6, 'Exclusive', 'Other') "Req
Mode"

    from SYS.USER$ U, SYS.OBJ$ A, V$LOCK B, V$SESSION C

   where A.OBJ#(+) = B.ID1 
     and B.SID = C.SID 
     and C.USERNAME is not null 
     AND a.owner# = u.user#(+) 
order by B.SID, B.ID2



-----Original Message-----
From: Weerd Kirsten, E.C. de [mailto:Kirsten.deWeerd_at_Oranjewoud.nl] Sent: Friday, October 27, 2000 9:25 AM
To: Multiple recipients of list ORACLE-L Subject: URGENT - LOCK

Hi,

I've got a session with a lock-wait.
I have the Lock-Address.

How can I determine which is object is being locked and by whom ???

Thanx in advance !

Greets,

Kirsten

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Weerd Kirsten, E.C. de
  INET: Kirsten.deWeerd_at_Oranjewoud.nl

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Oct 27 2000 - 08:13:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US