Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Begin Transaction - Atomicity, Slow performance, RAID
Message
De
31/05/2006 06:45:28
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
 
 
À
31/05/2006 00:33:16
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Divers
Thread ID:
01125731
Message ID:
01126099
Vues:
17
>I am using nested Transaction and also using recursive relation of Primary Key and Foreign Key in one table. I am also calling stored procedure (with transaction) within a transaction. is that ok?
>
>

>
> begin transaction t_update_deposit_advance
>
> /*
> Some table insertion and temporary tables.
> */
>
> /* this line also wrap with Transaction
> */
> EXEC spUpdateBalofBillPayable @PkTranIDTranWithBal
>
> /* this line also wrap with Transaction
> */
> EXEC spUpdateTransBalanceFromReceivePayment @PkTranIDTranWithBal
>
>
>
> IF (
> (@error_var1 <> 0) or
> (@error_var2 <> 0)
> )
> begin
> set @HasError=1
>
> ROLLBACK TRANSACTION t_update_deposit_advance
>
>
>
> end
>else
> begin
>
> set @HasError=0
> COMMIT TRANSACTION t_update_deposit_advance
> end
>
>


Simplicio,

Nested transactions are okay. Have you analyzed the execution plans for the queries?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform