Re: Trigger Question with Commit

From: <>
Date: Fri, 08 Aug 2008 23:48:42 +0200
Message-ID: <>

On Fri, 8 Aug 2008 14:40:45 -0700 (PDT), wrote:

>I know that you cannot commit inside a trigger. But, the trigger I
>have calls a procedure. That procedure inserts into another table and
>issues a commit.
>Problem is that the procedure is not only called from the trigger, but
>other procedures. So, sometimes a commit is needed.
>Can I use AUTONOMOUS_TRANSACTION for the call which is initiated from
>the trigger?

A transaction is a series of dml statements which *logically* belong together.
Surely you can use an AUTONOMOUNS_TRANSACTION if you are not interested in database consistency.
However, committing in a procedure is always a bad, bad idea, and has always been discouraged by Oracle.
However, if your ambition is to set up a disaster application, no one will stop you.

Sybrand Bakker
Senior Oracle DBA
Received on Fri Aug 08 2008 - 16:48:42 CDT

Original text of this message