Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Q: Recreating triggers dynamically on attribute change?
mnawani_at_table.jps.net wrote:
> Hi,
>
> Is there any way to propogate the attribute change to the triggers
> on the table themselves?
>
> The scenario is as given below:
>
> Table cust has following attributes : custno number(10),
> custname varchar2(50);
>
> There is an underlying trigger that audits the table on every
> insert , update and delete that records the table information
> to a audit table with the same schema as the CUST table alongwith
> additional columns such as the DML operation, USER, and the
> timestamp.
>
> Now, if the CUST schema is changed to add another column and so
> is the audit table, how do i re-create the trigger and compile it
> w/o operator interference except probably just to run a
> procedure that provides the tablename whose schema has changed.
>
> Any info will be highly appreciated.
>
> Thanks in advance
> Mahesh Nawani
Hi,
We use for this kind of stuff a small scripts that select all invalid
procedures, triggers, views and packages from dba_objects and generaties
alter package.... compile statements. Works reasonable but the person who
makes the changes should
always remember to run the script and if they don't users will complain
eventually.
Jeroen Received on Mon Jun 22 1998 - 00:00:00 CDT