Trace why a transaction is escalated to DTC
Asked Answered
H

2

13

Is there any way to determine precisely why a System.Transaction TrasactionScope is being escalated to the DTC? We are hitting a bump with one of our components that seem to escalate the transaction while all other components (which seem deceptively similar) does not do escalation.

Are any information made available on the reasons for the escalation and how can they be found and observed? SQL Profiler? Log files? Or am I out of luck on this one?

UPDATE: I'm running against SQL Server 2005 for info

Has answered 3/2, 2009 at 11:14 Comment(1)
Presuming the database is SQL 2005 or SQL 2008?Tubuliflorous
N
7

You could try shutting down the Distributed Transaction Cordinator service and setting its startup type to disabled. This will cause an exception when the transaction is promoted that will have the problem code in the call stack.

Of course this won't help if you have other items running on the machine that require this service, but would be possible on a debug machine.

Noncombatant answered 3/2, 2009 at 11:32 Comment(1)
Marking this the accepted answer because it actually helped me track down the issue (which was caused by a second connection being opened, just as Anton mentions in #507233)Has
O
9

When using TransactionScope a transaction is escalated whenever application opens a second connection (even to the same database) within the Transaction Scope in question.

Outstation answered 3/2, 2009 at 11:23 Comment(1)
More info: #1691392Thibault
N
7

You could try shutting down the Distributed Transaction Cordinator service and setting its startup type to disabled. This will cause an exception when the transaction is promoted that will have the problem code in the call stack.

Of course this won't help if you have other items running on the machine that require this service, but would be possible on a debug machine.

Noncombatant answered 3/2, 2009 at 11:32 Comment(1)
Marking this the accepted answer because it actually helped me track down the issue (which was caused by a second connection being opened, just as Anton mentions in #507233)Has

© 2022 - 2024 — McMap. All rights reserved.