Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how to 'insert a row, insert another row, commit the second insert and rollback the first'
Now that I have asked, I found the answer.
Autonomous PL/SQL Blocks
Autonomous PL/SQL blocks are PL/SQL blocks that have a transaction scope
independent of the transaction scope of the calling PL/SQL block. They can
perform operations, commit, and rollback independent of the transactions in
the calling block, before returning to the calling block. Transactions
within an autonomous PL/SQL block are referred to as autonomous
transactions. They are not nested transactions in that they do not share
resources with the calling transaction and committed changes are immediately
visible to other transactions regardless of whether the calling PL/SQL block
commits or rolls back. A PL/SQL stored procedure/function, local
procedure/function, a package/type method, or a top-level anonymous block
can be declared to be an autonomous block using the pragma specification:
pragma AUTONOMOUS_TRANSACTION
The above specification can appear anywhere in the declaration section of a PL/SQL block, but at most once.
The Oracle8i autonomous transactions feature provides a means of constructing reusable application subcomponents that perform specialized operations.
"Scott Mattes" <ScottMattes_at_yahoo.com> wrote in message
news:ntI_7.5277$gO5.2331072_at_news1.news.adelphia.net...
> Hopefully someone will remind me of how this is done. I read about it
within
> the last 6 months, but now that I want to use it I can not for the life of
> me remember where in the manual this command is.
>
> Thank you.
>
>
Received on Tue Jan 08 2002 - 14:38:25 CST