Created
June 26, 2013 06:05
-
-
Save sytkov/5865083 to your computer and use it in GitHub Desktop.
Current query from session
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.sql_id, t.sql_text | |
from V$SESSION s, v$sqltext_with_newlines t | |
where | |
s.status = 'ACTIVE' | |
and s.username = :p_schema | |
and s.machine = :p_machine | |
and t.address =s.sql_address | |
and t.hash_value = s.sql_hash_value | |
and s.sid = :p_sid | |
and s.type <>'BACKGROUND' | |
and s.last_call_et > 10 | |
order by s.sid,t.piece | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment