开发者

DTC transaction escalation

开发者 https://www.devze.com 2022-12-16 06:26 出处:网络
I am using TransactionScope. Within that scope, there are several different database connections. But all this connections on the same physical server and on the s开发者_开发百科ame Sql Server instanc

I am using TransactionScope. Within that scope, there are several different database connections. But all this connections on the same physical server and on the s开发者_开发百科ame Sql Server instance. The difference in connections is only in databases. Is this transaction will be DTC transaction?


Suggest you take a look at some of the other questions on the same topic, like this one:

TransactionScope automatically escalating to MSDTC on some machines?


I had a similar issue, but I was using two different connection strings. I found this article which solved the problem.

http://joeknowsdotnet.wordpress.com/2012/07/19/entity-framework-msdtc-gotchya/

If the connection strings are different, there will be 2 connections in the connection pool, which caused my DTC to escalate, even though it was SQL2012.

Maybe you can use the same connection string, and change the database in code?

See the Pool Fragmentation Due to Many Databases section on this page: http://msdn.microsoft.com/en-us/library/8xx3tyca(v=vs.110).aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消