Created
October 2, 2018 15:25
-
-
Save MilesDowe/198fd358136d38aa9a2aa5f77994980e to your computer and use it in GitHub Desktop.
General OracleSQL query to check active queries
This file contains 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.USERNAME, s.sid, s.serial#, s.osuser, t.sql_id, sql_text | |
from v$sqltext_with_newlines t,V$SESSION s | |
where t.address =s.sql_address | |
and t.hash_value = s.sql_hash_value | |
and s.status = 'ACTIVE' | |
and s.username <> 'SYSTEM' | |
order by s.sid,t.piece | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment