FIX: New Distributed Transactions in an AG database fails after you restart DTC service in SQL Server 2016

Applies to: SQL Server 2016 Service Pack 1SQL Server 2016 DeveloperSQL Server 2016 Enterprise

Symptoms


Consider the following scenario:

  • You have an AlwaysOn Availability Group (AG) database in Microsoft SQL Server 2016.
  • You restart the Microsoft Distributed Transaction Coordinators (DTC) service.
  • Assume that you execute Distributed Transaction in the AG enabled database. In this situation, you may notice that the transaction fails with errors that resemble the following:

Msg 8510, Level 20, State 3, Line LineNumber
 Enlist operation failed: 0x8004d01c(XACT_E_CONNECTION_DOWN). SQL Server could not register with Microsoft Distributed Transaction Coordinator (MS DTC) as a resource manager for this transaction. The transaction may have been stopped by the client or the resource manager.
 
 Msg 596, Level 21, State 1, Line LineNumber
 Cannot continue the execution because the session is in the kill state.
 
 Msg 0, Level 20, State 0, Line LineNumber
 A severe error occurred on the current command.  The results, if any, should be  discarded.

Workaround


A workaround for this issue is when you restart the SQL Server service then you may not receive the error. 

Resolution


This issue is fixed in the following cumulative update for SQL Server:

       Cumulative Update 6 for SQL Server 2016 SP1

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References


Learn about the terminology that Microsoft uses to describe software updates.