KB4538174 - FIX: Error occurs and AG will be in non-synchronizing state when failover happens in primary AG of Distributed Availability Group in SQL Server 2017 and 2019 on Linux

Applies to: SQL Server 2017 Developer LinuxSQL Server 2017 Enterprise on LinuxSQL Server 2017 Enterprise Core on Linux


Consider the following scenario:
  • You have configureda Distributed Availability Group in SQL Server 2017 or 2019 on Linux between the Availability Groups (AGs), AG1 andAG2. 
  • Assume that AG1 is the primary availability group with nodes, N1 , N2 andN3. 
  • If you try to fail over from N1 to N3 in availability group AG1, thesynchronization will get stuck in non-synchronizing state and will never become healthy. Additionally, you may notice the following error inerror log of N3: 
Error: 41166, Severity: 16, State:9
An error occurred while waiting toaccess the local availability replica of availability group 'Availability group Name'. The operation encountered SQL OS error 2, and has beenterminated. Verify that the local availability replica is in the correctstate, and then retry the command.


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


This 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 the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:


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