KB4492604 - FIX: Manual failover between forwarder and secondary replica fails with all replicas synchronized in SQL Server 2016 and 2017

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


Assume that you have many databases in a distributed Always On availability groups (AG) in Microsoft SQL Server 2016 and 2017. When you perform a manual failover over the second AG between forwarder and secondary replica, you will notice that it may fail even though allreplicas are synchronized. Additionally, you will receive error messages that resemble the following:

Msg 41104, Level 16, State 12, Line LineNumber

Failover of the availability group to the local replicafailed because the availability group resource did not come online due to aprevious error.

To identify the error, you can check the SQL Server error log, theWindows Server Failover Cluster logs and system event logs. For more informationabout how to view events and logs for a Windows Server Failover Clustering(WSFC) cluster, you can see Windows Server documentation. When you check the error log, you will find an error message that resembles the following:

The availability replica foravailability group '<AGName>' on this instance of SQL Server cannot become the primary replica. One or moredatabases are not synchronized or have not joined the availability group.


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.