Re: Begin Atomic

Re: Begin Atomic

 

  

You can use BEGIN ATOMIC or you can explicitly take a SAVEPOINT at the
beginning of the procedure.
A CONDITION HANDLER can then initiate the ROLLBACK to SAVEPOINT as desired.
(essentially this is how BEGIN ATOMIC works....)
Cheers
Serge



"Varma Jampana " <db2udbdba-ezmlmshield-x84407053.[Email address protected]
wrote on 07/27/2005 10:54:14 AM:

> Hi Experts,
>
> I am new to DB2. Can you please clarify the following:
>
> In a stored procedure, we will implement number of custom business rules
by
> writing number of DML statements. These all put together a transaction.
> When a procedure is executed, the transaction which consists of no. of
> business rules to be implemented 100%. If we got any error in the
middle,
> it should be rolled back to the state where the database is before
execution
> of the procedure.
>
> To implement the transaction consistency, is it necessary to use "Begin
> Atomic" statement while creating the Stored procedure or is there any
other
> way for this.
>
> Best Regards,
>
> Varma
>
>
>
> ---------------------------------------------------------------------
> PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
> website: http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>


DB2 & UDB email list listserv db2-l LazyDBA home page