Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Interesting Insert Trigger question
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