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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: DDL auditing - *Extremely* detailed

Re: DDL auditing - *Extremely* detailed

From: Juan Cachito Reyes Pacheco <jreyes_at_dazasoftware.com>
Date: Wed, 5 May 2004 09:17:33 -0400
Message-ID: <002601c432a3$585bb640$2501a8c0@dazasoftware.com>


Hi Ethan I posted it previously but is this basically

CREATE OR REPLACE TRIGGER tgr_ALTER
AFTER ALTER ON DATABASE
DECLARE
 csql_text ora_name_list_t;
 n NUMBER;
 cSQL CLOB;
BEGIN
  n:= ora_sql_txt(csql_text);
  FOR I IN 1..N LOOP
   cSQL:=cSQL||csql_text(i);
 END LOOP;  INSERT INTO ddls
 (dd2_user, dd2_time, dd2_objeto, dd2_tipo,DD2_SQL,   DD2_OSUSER , DD2_MACHINE , DD2_OPROGRAM)  select sys_context( 'userenv', 'current_user' ),

        sysdate,
        ora_dict_obj_name,
        ora_dict_obj_type,
        cSQL,
        sys_context( 'userenv', 'external_name' ),
        s.machine,
        s.program

   from v$session s
  where sid = ( select sid from v$mystat where rownum=1 ); END; Juan Carlos Reyes Pacheco
OCP
Database 9.2 Standard Edition

Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Wed May 05 2004 - 08:20:35 CDT

Original text of this message

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