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: Please tell me how to know whether or not a table is locked

RE: Please tell me how to know whether or not a table is locked

From: Mohammad Rafiq <rafiq9857_at_hotmail.com>
Date: Thu, 06 Sep 2001 09:58:32 -0700
Message-ID: <F001.0038583F.20010906100255@fatcity.com>

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

Regards

MOHAMMAD RAFIQ Reply-To: ORACLE-L_at_fatcity.com
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> 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
/

   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: rafiq9857_at_hotmail.com

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 Thu Sep 06 2001 - 11:58:32 CDT

Original text of this message

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