Re: DDL Trigger on schema - capturing content

From: DA Morgan <damorgan_at_psoug.org>
Date: Sat, 08 Mar 2008 16:36:53 -0800
Message-ID: <1205023008.391020@bubbleator.drizzle.com>


Luch wrote:
> I'm using a trigger like so:
> CREATE OR REPLACE
> TRIGGER TRG_SCHEMA_CHANGES
> AFTER DDL ON "MYSCHEMA".SCHEMA
>
> To capture all schema changes to a table I made. I use these variables
> to capture some pertinent data:
> ora_login_user;
> ora_sysevent;
> ora_dict_obj_type;
> ora_dict_obj_owner;
> ora_dict_obj_name;
>
> I put the above into fields of the table I made. Seems to work fine.
>
> What I would like to know is, how do I capture the ddl statement
> itself? I'd like to put the DDL statement itself that fired the
> trigger into a clob/blob field.

Demo in Morgan's Library under DDL event triggers at www.psoug.org.

-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sat Mar 08 2008 - 18:36:53 CST

Original text of this message