DBMS_SQL package in a trigger
Posted on 2002-05-21
Is there a workaround for the following: (?)
I have a trigger (on insert) that wants to create a function (CREATE OR REPLACE FUNCTION fn ...)
I can build the function text in a string, then i try to use DBMS_SQL to open a cursor, parse the text, and close the cursor. (This is the same procedure that will work for normal DDL statement processing.)
But I'm getting an Oracle error 4092 - Cannot commit in a trigger.
Of course you can't commit in a trigger, but the DBMS_SQL package is in fact attempting it... Is there a method of creating functions from a trigger that is different from the method i tried?
any help is appreciated.