Try this script also:
column object_name justify c heading "Object|Name" format a32
column username justify c heading "User|Name" format a7
column osuser justify c heading "OS|User" format a7
column pid justify c heading "Ora|Proc|ID" format 999
column serial# justify c heading "Ora|Serial|#" format 999999
column sid justify c heading "Holding|Session" format 999
column spid justify c heading "Unix|Proc" format a5
column object_id justify c heading "Obj|ID" format 99999
column lockwait justify c heading "Lock|Wait"
column type justify c heading "Lock|Type" format a4
column lmode justify c heading "Mode" format 9999
set pagesize 60 linesize 100
select lck.sid, ses.serial#, pro.pid, pro.spid, obj.object_name,
obj.object_id, ses.username, ses.osuser,
lck.type, lck.lmode
from dba_blockers blk, dba_objects obj, v$lock lck,
v$session ses, v$process pro
-- where blk.holding_session = ses.sid
where blk.holding_session = ses.sid
and lck.id1 = obj.object_id
-- and lck.sid = ses.sid
-- and ses.paddr = pro.addr
and ses.username is not NULL
and ses.paddr = pro.addr
and lck.sid = ses.sid
and blk.holding_session = ses.sid
order by obj.object_name, ses.lockwait desc, lck.sid;
clear columns
Regards
MOHAMMAD RAFIQ
Reply-To: [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Date: Thu, 06 Sep 2001 07:01:13 -0800
Hi,
select dbo.owner||'.'||dbo.object_name object,
dbo.Object_type
from v$locked_object lo,
dba_objects dbo
where lo.object_id = dbo.object_id
/
----- Original Message -----
From: Ha Duy Thien
To: Multiple recipients of list ORACLE-L
Sent: Thursday, September 06, 2001 5:00 AM
Subject: Please tell me how to know whether or not a table is locked
Hi Gurus
Please let me know which view can show me a table that is being locked.
Thanks a lot
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Mohammad Rafiq
INET: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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).