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 -> Re: Schema Level Trigger difficulties

Re: Schema Level Trigger difficulties

From: DA Morgan <damorgan_at_psoug.org>
Date: Sat, 16 Jul 2005 12:47:36 -0700
Message-ID: <1121543261.511704@yasure>


ChrisH wrote:
> Have answered my own question now.
>
> ora_sql_txt (sql_text out
> ora_name_list_t)
>
> BINARY_INTEGER
>
> Returns the SQL text of the triggering statement in the OUT parameter.
> If the statement is long, it is broken up into multiple PL/SQL table
> elements. The function return value specifies how many elements are in
> the PL/SQL table.
> sql_text ora_name_list_t;
> stmt VARCHAR2(2000);
> ...
> n := ora_sql_txt(sql_text);
> FOR i IN 1..n LOOP
> stmt := stmt || sql_text(i);
> END LOOP;
> INSERT INTO event_table ('text
> of triggering statement: ' ||
> stmt);
>
> thanks.
>
> chris.

Another possible solution using SYSTEM EVENTS.

www.psoug.org
click on Morgan's Library
click on System Events
scroll down to ORA_DICT_OBJ_TYPE

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Sat Jul 16 2005 - 14:47:36 CDT

Original text of this message

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