Does BEGIN DISTRIBUTED TRANSACTION affect the @@TRANCOUNT ?
I don't think so.
BOL: "The BEGIN TRANSACTION statement increments @@TRANCOUNT by 1. ROLLBACK TRANSACTION decrements @@TRANCOUNT to 0, except for ROLLBACK TRANSACTION
savepoint_name, which does not affect @@TRANCOUNT. COMMIT TRANSACTION or COMMIT WORK decrement
@@TRANCOUNT by 1."
Kalman Toth Database & OLAP Architect
New Book / Kindle: Pass SQL Exam 70-461 & Job Interview: Programming SQL Server 2012
So if I start a local transaction that then at some point escalates automatically to a distributed transaction, is it correct to state that @@TRANCOUNT will come back to 0 ?
I really appreciate your help!
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.
Would you like to participate?