Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: comments on 8i's autonomous PL/SQL block?
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
> 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:36:41 CDT
![]() |
![]() |