分布式事务已完成.将此会话注册为新事务或NULL事务 [英] Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction

查看:166
本文介绍了分布式事务已完成.将此会话注册为新事务或NULL事务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是好奇是否有人遇到了这个特殊的错误并且知道如何解决?

Just curious if anyone else has got this particular error and know how to solve it?

情况如下...

我们有一个使用Enterprise Library的ASP.NET Web应用程序,该应用程序在Windows Server 2008 IIS服务器场上运行,该服务器场连接到SQL Server 2008群集后端.MSDTC已打开.数据库连接已合并.

We have an ASP.NET web application using Enterprise Library running on Windows Server 2008 IIS farm connecting to a SQL Server 2008 cluster back end. MSDTC is turned on. DB connections are pooled.

我怀疑这条线的某个地方有一个失败的MSDTC事务,该连接被返回到池中,并且在不同页面上的下一个查询正在拾取行为异常的连接,并收到此特定错误.有趣的是,我们在不需要任何分布式事务(提交到两个数据库等)的查询中遇到此错误.收到错误后,我们只会执行选择查询(无事务).

My suspicion is that somewhere along the line there is a failed MSDTC transaction, the connection got returned to the pool and the next query on a different page is picking up the misbehaving connection and got this particular error. Funny thing is we got this error on a query that has no need whatsoever with distributed transaction (committing to two database, etc.). We were only doing select query (no transaction) when we got the error.

我们进行了SQL分析,并且查询在SQL Server上运行,但是再也没有回来(因为MSDTC事务已在连接中中止).

We did SQL Profiling and the query got ran on the SQL Server, but never came back (since the MSDTC transaction was already aborted in the connection).

其他一些与此相关的错误是

Some other related errors to accompany this are:

  • 不允许启动新请求因为它应该带有有效的事务描述符.
  • 内部.Net Framework数据提供程序错误60.

推荐答案

MSDTC具有默认的90秒超时,如果一个查询的执行时间超过了该时间限制,则在尝试提交事务时会遇到此错误.

MSDTC has default 90 seconds timeout, if one query execute exceed this time limit, you will encounter this error when the transaction is trying to commit.

这篇关于分布式事务已完成.将此会话注册为新事务或NULL事务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆