查詢物件是否被鎖

zgy13121發表於2008-10-18

--查詢物件是否被鎖

SELECT /*+ rule */ s.username, decode(l.type,'TM','TABLE LOCK', 'TX','ROW LOCK', NULL) LOCK_LEVEL, o.owner,o.object_name,o.object_type, s.sid,s.serial#,s.terminal,s.machine,s.program,s.osuser

FROM v$session s,v$lock l,dba_objects o

WHERE l.sid = s.sid AND l.id1 = o.object_id(+) AND s.username is NOT Null

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/11419868/viewspace-1012080/,如需轉載,請註明出處,否則將追究法律責任。

相關文章