From oracle-l-bounce@freelists.org  Wed May  5 08:20:35 2004
Return-Path: <oracle-l-bounce@freelists.org>
Received: from air189.startdedicated.com (root@localhost)
 by orafaq.com (8.11.6/8.11.6) with ESMTP id i45DK9L04076
 for <oracle-l@orafaq.com>; Wed, 5 May 2004 08:20:19 -0500
X-ClientAddr: 206.53.239.180
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i45DJx604010
 for <oracle-l@orafaq.com>; Wed, 5 May 2004 08:20:09 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP
 id 4718372CE7B; Wed,  5 May 2004 08:09:18 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 20939-99; Wed,  5 May 2004 08:09:18 -0500 (EST)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP
 id 757BA72CB16; Wed,  5 May 2004 08:09:17 -0500 (EST)
Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 05 May 2004 08:08:00 -0500 (EST)
X-Original-To: oracle-l@freelists.org
Delivered-To: oracle-l@freelists.org
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 15BA072C89D
 for <oracle-l@freelists.org>; Wed,  5 May 2004 08:07:46 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 21249-38 for <oracle-l@freelists.org>;
 Wed,  5 May 2004 08:07:45 -0500 (EST)
Received: from mail.acelerate.com (mail.acelerate.com [200.105.128.132])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with SMTP id 3B91172C7E7
 for <oracle-l@freelists.org>; Wed,  5 May 2004 08:07:45 -0500 (EST)
Received: (qmail 3807 invoked from network); 5 May 2004 13:21:29 -0000
Received: from dazasoftware.com (HELO org48l7d9ara8b) (200.105.151.94)
  by 0 with SMTP; 5 May 2004 13:21:29 -0000
Message-ID: <002601c432a3$585bb640$2501a8c0@dazasoftware.com>
From: "Juan Cachito Reyes Pacheco" <jreyes@dazasoftware.com>
To: <oracle-l@freelists.org>
References: <DD0385472EABFB40A8A492087DEC551E099264D4@dalexch03.rmf.ps.net>
Subject: Re: DDL auditing - *Extremely* detailed
Date: Wed, 5 May 2004 09:17:33 -0400
MIME-Version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Virus-Scanned: by amavisd-new at freelists.org
X-archive-position: 4424
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: jreyes@dazasoftware.com
Precedence: normal
Reply-To: oracle-l@freelists.org
X-list: oracle-l
X-Virus-Scanned: by amavisd-new at freelists.org

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@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
-----------------------------------------------------------------

