set pagesize 100
set linesize 250
col module for a20
col event for a26
col last_call for a18
col objectname for a30
col username for a10
select /*+RULE */s.username username , s.sid,s.serial#, p.spid,o.OBJECT_NAME objectname, s.process,substr(s.module,1,20) module,
select /*+RULE */s.username username , s.sid,s.serial#, p.spid,o.OBJECT_NAME objectname, s.process,substr(s.module,1,20) module,
to_char(sysdate - s.last_call_et/60/60/24,'DD-MON-YYYY HH24:MI') last_call,
substr(w.event,1,24) event,
decode(block ,0,'NO','YES') BLOCKER,
decode(request,0,'NO','YES') WAITER
from v$lock l, v$session s, v$process p, v$session_wait w,v$locked_object lb, dba_objects o where
(l.request > 0 or l.block > 0 ) and s.sid=l.sid and p.addr=s.paddr and s.last_call_et > 600 and w.sid=s.sid and s.sid = lb.SESSION_ID and lb.OBJECT_ID = o.OBJECT_ID order by last_call_et desc;
Note: The above is SQL is used during some of my daily tasks it can be modified for custom information retrieval. The SQL is just for a quick use if needed and for informational purposes.
No comments:
Post a Comment