RE: SqlTransaction, t-sql transactions, and distributed transactions
- From: v-kevy@xxxxxxxxxxxxxxxxxxxx (Kevin Yu [MSFT])
- Date: Thu, 14 Dec 2006 03:36:23 GMT
Hi Mark,
1) Yes, SQL Server supports nested transactions. The COMMIT statement will
only commits to the current level of transaction, however, ROLLBACK will
rollback all the transactions.
1a) In this case, you have to check the @@TRANCOUNT function to see whether
the transaction has been rolled back before. For more information on
@@TRANCOUNT, please check:
http://msdn2.microsoft.com/en-us/library/ms187967.aspx
2) It's not a good practice to mix SqlTransaction and BEGIN TRANSACTION
together. You can use either of them. But if you mix them, it will work as
nested.
3) The transaction will be promoted to the DTC Service, and the DTC service
will handle the distributed transaction.
4) If your comsumers will open the transaction in ADO.NET, you don't need
to use transaction in your stored procedures.
If anything is unclear, please feel free to let me know.
Kevin Yu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
.
- Follow-Ups:
- Prev by Date: Re: SqlTransaction, t-sql transactions, and distributed transactions
- Next by Date: ADO adDate Value Calculation
- Previous by thread: Re: SqlTransaction, t-sql transactions, and distributed transactions
- Next by thread: RE: SqlTransaction, t-sql transactions, and distributed transactio
- Index(es):
Relevant Pages
|
|