Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> on server error db trigger to capture offending sql

on server error db trigger to capture offending sql

From: Leeroy <leigh_at_deakin.edu.au>
Date: 7 Nov 2001 20:39:51 +1000
Message-ID: <01c16770$2d2ce6c0$48063acb@win95pc>


Hi folks,

       I was wishing to create a db trigger to capture (to a table) erroneous DML (i.e. actual sql statement used) issued by vendor written apps and also small number of sqlplus users to help keep me aware of their actions (you know big brother thing) and was all geared up to use a db trigger firing on "server error" to grab the offending sql via v$session's prev_hash_value column however after continually getting the current trigger sql I logged a call to find that a bug exists in 8.1.6.x and 8.1.7.x (possibly other versions) such that sql_hash_value and prev_hash_value are the same and this will not be fixed until a future version of 9. The suggestion from Oracle was to use dbms_trace. Anyone already achieved this using dbms_trace for logging offending DML only? Call me crazy but I'd like to know how often and why my users are stuffing up such as - ORA-00001.

Regards.. Received on Wed Nov 07 2001 - 04:39:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US