Re: ora-04091, updating same table in trigger

From: Bill Ferguson <wbfergus_at_gmail.com>
Date: Wed, 22 Apr 2009 06:38:10 -0600
Message-ID: <4025610e0904220538q2c424b5es899f3c7fd2e8d3b0_at_mail.gmail.com>



I've had to deal with that issue as well.

In my database, my workaround was taking some of the logic out of the trigger and creating procedures that get called from the trigger.

In the trigger itself, I have to use the "PRAGMA AUTONOMOUS_TRANSACTION;" declaration, and use several 'COMMIT' statements inside the trigger, like before the calls to the procedures, at the end of the trigger, etc. It took a bit of experimentation, but I finally got it all figured out and working correctly.

This is on 11.1.0.6 on Windows Server 2003, so I'm not sure if this will work the same on other/previous versions or O/S's.

Hope this helps.

--

Received on Wed Apr 22 2009 - 07:38:10 CDT

Original text of this message