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: locks?

Re: locks?

From: Vidya Kalyanaraman <kvidya13_at_hotmail.com>
Date: Thu, 03 Aug 2000 10:59:53 EDT
Message-Id: <10578.113736@fatcity.com>


Pls have a look at the following query... I got it from one of the lists...
set linesize 200
set pagesize 40

col object_name format a25
col object_id format 999999 heading 'OBJ|ID'
col locked_mode format 999 heading 'OBJ|LCK'
col lmode format 999 heading 'SES|LCK'
col sid format 999
col status format a8
col Descrip format a10
col type format a4
col Blk heading 'BLK?'
select b.object_name,a.object_id,a.locked_mode,c.lmode, decode(c.lmode,0,'None',1,'Null',2,'Row-S',3,'Row-X',4,'Share',5,'S/Row-X',6 ,'Exclusive') Descrip,

       d.sid,d.serial#,d.status, c.ctime,decode(c.block,0,'No',1,'Yes') Blk,c.type
  from v$locked_object a, dba_objects b, v$lock c, v$session d where a.object_id=b.object_id

   and c.sid=a.session_id
   and c.sid=d.sid
order by b.object_name,c.lmode desc,c.ctime; set linesize 80
set pagesize 14

Thanks
Vidya

From: Swapna_P <Swapna_P_at_satyam.com>
Reply-To: ORACLE-L_at_fatcity.com
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> Subject: locks?
Date: Thu, 03 Aug 2000 05:18:09 -0800

how can i find out the locks existing on a table and by whom? rgds
swapna



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com Received on Thu Aug 03 2000 - 09:59:53 CDT

Original text of this message

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