One of the example i have with use of autonomous block is errror logging .
whenever an error happens we call a procedure which does insert some
debugging info into tables but that procedure is independent of calling
procedures . Which means even if the main transaction rollsback due to error
we will still have trace of error . One thing to make sure is autonomous
block always do a commit or rollback of its work before exiting .


begin
 xxx
xxx

exception
call errorlog;   -- this is autonomous
rollback;

end ;


-ak

----- Original Message ----- 
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Wednesday, July 23, 2003 12:04 PM


> 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: [EMAIL PROTECTED]
>
> 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: [EMAIL PROTECTED] (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).
>
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: AK
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to