Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: What do you use autonomous transactions for?

Re: What do you use autonomous transactions for?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 17 Feb 2004 10:58:59 -0000
Message-ID: <01bc01c3f545$0bce16b0$6702a8c0@Primary>

There's an example of the sorts of error that this can produce in my book on
pages 446-448.

Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

  The educated person is not the person
  who can answer the questions, but the
  person who can question the answers -- T. Schick Jr

Next public appearances:
 March 2004 Hotsos Symposium - The Burden of Proof  March 2004 Charlotte NC OUG - CBO Tutorial  April 2004 Iceland

One-day tutorials:
http://www.jlcomp.demon.co.uk/tutorial.html

Three-day seminar:
see http://www.jlcomp.demon.co.uk/seminar.html
____UK___February
____UK___June

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Hi,

Apparently, it is not recommended to use autonomous transactions to avoid mutating table errors, as documented in Metalink Note:65961.1:

"As all database changes are part of a transaction, if a parent has modified data, but not committed it at the point the autonomous transaction begins, then those modifications are not visible to the child...It is important to remember that if a trigger is running as an autonomous transaction, although it still has access to :OLD and :NEW values as appropriate, it does not see any rows inserted into the table by the calling transaction. Thus, using an autonomous trigger to obtain a maximum value currently in the table...[in other words, a mutating table scenario]...is unlikely to work."

Cheers,

Tony.



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Tue Feb 17 2004 - 04:58:59 CST

Original text of this message

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