DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Friday, January 8, 2016

List Database Session Waits

SET PAUSE on
SET PAUSE 'Press Return to Continue'
SET LINESIZE 300
SET PAGESIZE 60
COLUMN username FORMAT A20
COLUMN event FORMAT A25
COLUMN wait_class FORMAT A20
 
SELECT NVL(s.username, '(oracle)') AS username,
s.sid,
s.serial#,
sw.event,
sw.wait_class,
sw.wait_time,
sw.seconds_in_wait,
sw.state
FROM   v$session_wait sw,
v$session s
WHERE  s.sid = sw.sid
ORDER BY sw.seconds_in_wait DESC
/



No comments: