How to calculate HASH_VALUE for Specific SQL
473726Dec 2 2005 — edited Dec 2 2005I have an auditing trigger and want to filter out known statements.
I can, from within the trigger, obtain the SQL that fired the trigger (dbms_standard.sql_txt function).
I want to be able to calculate the HASH_VALUE for this SQL to use in a decision tree.
If I have auditing enabled (I do) I can use the audsid {sys_context('USERENV','SESSIONID')} to lookup my SID and from there peruse several V$ views. This seems rather cumbersome.
Does anyone know of a built-in function to either calculate the HASH_VALUE, when given SQL_TEXT or to return the HASH_VALUE for the firing SQL statement?
Thanks