Skip to content

Instantly share code, notes, and snippets.

@dotmaik1
Created October 6, 2016 16:38
Show Gist options
  • Select an option

  • Save dotmaik1/ab07b626ca2fc7ee8b78268ae04c74b5 to your computer and use it in GitHub Desktop.

Select an option

Save dotmaik1/ab07b626ca2fc7ee8b78268ae04c74b5 to your computer and use it in GitHub Desktop.
Checa por esperas y muestra el evento que esta esperando
set lines 200 pages 200
col state for a15
col seq# for 999999
col P1_P2_P3_TEXT for a30
col event for a20
select w.sid, to_char(p.spid,'99999') PID,
substr(w.event, 1, 28) event, substr(s.username,1,8) username,
substr(s.osuser, 1,8) osuser,
substr(w.state,1,20),
w.seq#,
w.wait_time, w.seconds_in_wait wis,
substr(w.p1text||' '||to_char(w.P1)||'-'||
w.p2text||' '||to_char(w.P2)||'-'||
w.p3text||' '||to_char(w.P3), 1, 45) P1_P2_P3_TEXT
, s.sql_hash_value
from v$session_wait w, v$session s, v$process p
where s.sid=w.sid
and p.addr = s.paddr
and w.event not in ('SQL*Net message from client', 'pipe get')
and s.username is not null
/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment