Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save RichVRed/7b0a9dd24d1e3080eba15ebe5a6ead4d to your computer and use it in GitHub Desktop.

Select an option

Save RichVRed/7b0a9dd24d1e3080eba15ebe5a6ead4d to your computer and use it in GitHub Desktop.
select s.sid, s.username, s.osuser,
s.machine, s.process, s.program, s.module,
q.sql_text, q.optimizer_cost,
s.blocking_session, bs.username as blocking_user,
bs.machine as blocking_machine, bs.module as blocking_module,
bq.sql_text as blocking_sql, s.event as wait_event,
q.sql_fulltext
from v$session s, v$sql q, v$session bs, v$sql bq
where s.sql_id = q.sql_id
and s.blocking_session = bs.sid(+)
and bs.sql_id = bq.sql_id(+)
and s.type = 'USER';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment