Trace why a transaction is escalated to DTC

别等时光非礼了梦想. 提交于 2019-12-08 15:07:31

问题


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


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/506733/trace-why-a-transaction-is-escalated-to-dtc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!