Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction

Jimmy Chandra picture Jimmy Chandra · Jun 30, 2009 · Viewed 26.5k times · Source

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

The scenario is as follow...

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.

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.

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:

  • New request is not allowed to start because it should come with valid transaction descriptor.
  • Internal .Net Framework Data Provider error 60.

Answer

Russel Yang picture Russel Yang · Aug 20, 2010

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.