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: comments on 8i's autonomous PL/SQL block?

RE: comments on 8i's autonomous PL/SQL block?

From: Gogala, Mladen <MGogala_at_oxhp.com>
Date: Wed, 23 Jul 2003 15:38:48 -0400
Message-Id: <25998.339238@fatcity.com>


Yes, Maryan, that's exactly what you can do. Actually, session and transaction
information are separated, so you can launch a separate transaction from within the
current transaction. Here is an exerpt from the 9i PL/SQL manual:

Once started, an autonomous transaction is fully independent. It shares no locks, resources, or commit-dependencies with the main transaction. So, you can log events, increment retry counters, and so on, even if the main transaction rolls back.

Unlike regular triggers, autonomous triggers can contain transaction control statements such as COMMIT and ROLLBACK. Also, unlike regular triggers, autonomous triggers can execute DDL statements (such as CREATE and DROP) using native dynamic SQL

The only missing feature is that you cannot do that asynchronously.

Mladen Gogala
Oracle DBA
Phone:(203) 459-6855
Email:mgogala_at_oxhp.com

-----Original Message-----
From: Maryann Atkinson [mailto:maryann_30_at_yahoo.com] Sent: Wednesday, July 23, 2003 3:04 PM
To: Multiple recipients of list ORACLE-L Subject: comments on 8i's autonomous PL/SQL block?

Does anyone have any examples on the autonomous block provided in 8i? I read that it can have a transaction scope thats independent of the transaction scope of the calling block, and that it can perform operations, commit and rollback independent of the transactions of the calling block, before returning to the calling block?

How is that? Does it mean it can start a transaction, update something, commit the change, and then return to the calling block where a change may still be uncommitted, even though the called block issued a commit?

thx
maa

--

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

Author: Maryann Atkinson
  INET: maryann_30_at_yahoo.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Jul 23 2003 - 14:38:48 CDT

Original text of this message

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