-
-
Save RichVRed/7b0a9dd24d1e3080eba15ebe5a6ead4d to your computer and use it in GitHub Desktop.
Oracle - What SQL is executing right now? (https://app.pluralsight.com/library/courses/oracle-performance-tuning-developers/table-of-contents)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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