views:

541

answers:

2

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

+2  A: 

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

Anton Gogolev
+2  A: 

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.

Martin Brown
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 http://stackoverflow.com/questions/506733/trace-why-a-transaction-is-escalated-to-dtc/506753#506753)
soren.enemaerke