Skip to main content
Version: v23.0

SQL Server ERROR 35222 When Removing a Replica from an Availability Group

Applies to:

  • Microsoft SQL Server 2017

Summary

When removing a node from a SQL Server 2017 availability group Vhost, the secondary replica is not removed from the availability group on the primary replica.

Event Details

This is a known issue with SQL Server 2017 availability groups that are not running Cumulative Update 1 or higher. This error only occurs when the cluster type is set to either "NONE" or "EXTERNAL". The following error is logged to the DH2i Event Log when attempting to remove a node from an existing availability group Vhost.

Log Name:      DH2i
Source: DxEngine
Date:
Event ID: 1001
Task Category: None
Level: Error
Computer:
Description:
Caught exception: System.Data.SqlClient.SqlException (0x80131904): Could not process the
operation. Always On Availability Groups does not have permissions to access the Windows Server
Failover Clustering (WSFC) cluster. Disable and re-enable Always On Availability Groups by using
the SQL Server Configuration Manager. Then, restart the SQL Server service, and retry the
currently operation. For information about how to enable and disable Always On Availability
Groups, see SQL Server Books Online. Availability group '< ag_name >' failed to process
remove-replica command. The operation encountered SQL Server error 35222 before the availability
group configuration could be updated, and has been rolled back. Refer to the SQL Server error log
for details. If this is a Windows Server Failover Clustering (WSFC) availability group, verify
that the local WSFC node is online, and then retry the command. Otherwise, contact your primary
support provider.

Resolution

This problem was addressed in Microsoft SQL Server Cumulative Update 1.