Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Locks
spool holding_session.lst
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 and lck.id1 = obj.object_id and lck.sid = ses.sid
Reply-To: ORACLE-L_at_fatcity.com
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
Date: Thu, 21 Jun 2001 13:36:00 -0800
Does anyone have any script that will help me find out the locks that are held in the database.
We are facing a problem related to lock.One of the transaction is holding a
lock on a table and
there is another transaction wanting a lock on that table but waits for long
time .Is there
any lock timeout parameter that can be set on the database.
Thanks
Ravindra
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Ravindra Basavaraja INET: ravindra_at_sentica.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-LReceived on Thu Jun 21 2001 - 16:55:26 CDT
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com -- 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).