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: table locked from n minutes

Re: table locked from n minutes

From: <solbeach_at_cox.net>
Date: Fri, 2 Apr 2004 10:09:56 -0500
Message-Id: <20040402150956.SYAR2477.fed1mtao01.cox.net@smtp.west.cox.net>


> Is there a way to know that a table has been locked for n minutes ?

Reports session(s) which have held an exclusive lock more than 10 minutes.



select object_name, do.object_id, session_id, serial#, osuser, username, locked_mode , start_time, module from dba_objects do, v$session, v$locked_object lo, v$transaction where to_date(start_time,'MM/DD/YY HH24:MI:SS') <

             (sysdate-(10/1440))
 and locked_mode in (3,5,6)
 and session_id = sid
 and saddr = ses_addr
 and lo.object_id = do.object_id
 order by start_time desc
/



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Fri Apr 02 2004 - 09:06:38 CST

Original text of this message

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