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: Interesting Insert Trigger question

Re: Interesting Insert Trigger question

From: Karen <karen.abgarian_at_fmr.com>
Date: 2000/08/04
Message-ID: <398ADA3A.E544BE66@fmr.com>#1/1

Hi,

Try autonomous transactions. You can commit in them and therefore can do DDL.
However, creating triggers from another trigger seems to me a bit ... extreme.
Could you share the necessity of doing such a thing?

Regs
Karen Abgarian.

milan wrote:

> Hi All,
>
> I have an row level after insert trigger on table DEPT which calls a
> stored procedure to dynamically create a trigger on a different table
> based on the values inserted into table DEPT. I get the following error
> :
>
> ORA-04092: cannot COMMIT in a trigger ORA-06512: at
> "SCOTT.PKG_GENERATE_TRIGGERS", line 166 ORA-06512: at
> "SCOTT.PKG_GENERATE_TRIGGERS", line 277 ORA-06512: at
> "SCOTT.TRG_RA_INS_DEPT", line 3 ORA-04088: error during execution of
> trigger 'SCOTT.TRG_RA_INS_DEPT'
>
> I understand that you cannot have any commits inside the trigger body,
> however the same happens on an Alter trigger based at the schema level
> which according to the documentation allows create statemants with the
> trigger body. Does anyone know how I get around this problem. I am using
> Oracle8i 8.1.5. I was maybe thinking of using DBMS_JOB to schedule the
> creation of the trigger sometime after that way it happens in a separate
> session and do not have to worry about the restrictions on triggers.
>
> Any help is appreciated greatly.
>
> Thanks
>
> Ketan
Received on Fri Aug 04 2000 - 00:00:00 CDT

Original text of this message

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