|
WebDB1|/oracle/dba_script> vi session_wait.sql
"session_wait.sql" 23 lines, 540 characters
set timing on
set pagesize 300
set lines 100
col spid for a8
col sid for 999
col event for a25
col program for a50
spool session_wait.log
select p.spid, w.sid, s.serial#, w.event, s.username, s.program, w.p1, w.p2, t.sql_text
from v$session_wait w, v$process p, v$session s, v$sql t
where s.paddr = p.addr
and w.sid = s.sid
and s.sql_address = t.address
and w.event not like '%SQL*N%'
and w.event not like '%rdbms%'
and w.event not like '%null%'
and w.event not like '%timer%'
and w.event not like '%wakeup%'
order by sid;
spool off
exit
|