Skip to content

Instantly share code, notes, and snippets.

@katjunior
Created September 18, 2013 16:00
Show Gist options
  • Save katjunior/6611362 to your computer and use it in GitHub Desktop.
Save katjunior/6611362 to your computer and use it in GitHub Desktop.
Oracle - Select Sql Text from System Process ID
select s.sql_text,s.sql_fulltext from v$sql s
where sql_id in (SELECT A.SQL_ID FROM V$SESSION A,V$PROCESS B
WHERE A.PADDR=B.ADDR AND B.SPID='6495')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment