Skip to content

Instantly share code, notes, and snippets.

@dotmaik1
Created October 6, 2016 16:32
Show Gist options
  • Select an option

  • Save dotmaik1/7ca7aefe2b179e18f29d832b414c7198 to your computer and use it in GitHub Desktop.

Select an option

Save dotmaik1/7ca7aefe2b179e18f29d832b414c7198 to your computer and use it in GitHub Desktop.
It gets the query that was issue by Hash Value
set verify off
accept trgthash number default 0 prompt 'What is the SQL Hash Value : '
select t.sql_text
from v$sqltext_with_newlines t
where t.hash_value + 0 = &trgthash
and &trgthash != 0
order by t.piece;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment