FIX: Assertion occurs when linked server which points to itself is used in a cross-database transaction in SQL Server 2016 and 2017

Applies to: SQL Server 2016 DeveloperSQL Server 2016 EnterpriseSQL Server 2016 Enterprise Core


Consider the following scenario:

  • You have an Always On Availability Group (AG) with DTC_SUPPORT = PER_DB. 
  • You create a linked server which points to itself.
  • You create a transaction which accesses a database that participates in the AG by using the linked server together with any other database on the server, or even the same database without the linked server.

In this scenario, an assertion will occur, and you may receive error messages that resemble the following:

DateTime spid SpidNumber     * Expression:  ITaskProxy::FIsCurrentTaskProxy (m_owningTaskProxy)

DateTime spid SpidNumber     * SPID:   SpidNumber

DateTime spid SpidNumber     * Process ID: ProcessNumber


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


The issue is fixed in the following cumulative updates for SQL Server:
About cumulative updates for SQL Server:

Each new cumulative update for SQL Server contains all thehotfixes and all the security fixes that were included with the previouscumulative update. Check out the latest cumulative updates for SQL Server:


Learn about the terminology thatMicrosoft uses to describe software updates.