0

I have a distributed SQL Server (Always On) High Availability Group, using SQL Server 2016, with the purpose of disaster recovery. The servers exist in different datacenters, and the primary is doing async commits to the Distributed AG. I want to test a failover to the DAG without disrupting the traffic flow to the primary.

My question is - If I execute the ALTER AVAILABILITY GROUP [DAG_NAME_HERE] FORCE_FAILOVER_ALLOW_DATA_LOSS; command on the DAG, will both servers now be able to handle read/writes, or will the original primary become unavailable, and only the DAG (which is now the primary) can handle read/writes.

2 Answers2

0

Only the secondary (which is not the primary) can do read/writes. The others are suspended.

From MS (https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/perform-a-forced-manual-failover-of-an-availability-group-sql-server?view=sql-server-ver15):

The secondary databases in the remaining secondary replicas are suspended and must be manually resumed.

benjamin moskovits
  • 5,261
  • 1
  • 12
  • 22
  • The line from the documentation you quoted is for a vanilla SQL High Availability Group, I'm think the behavior is different when dealing with a Distributed HAG (https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/distributed-availability-groups?view=sql-server-ver15) – TimFortin Jul 07 '21 at 12:12
0

Confirmed that running the ALTER AVAILABILITY GROUP [DAG_NAME_HERE] FORCE_FAILOVER_ALLOW_DATA_LOSS; SQL Command against the secondary in a Distributed Availability Group configuration, both SQL Servers essentially become a primary that can handle read/writes, but synchronization between the 2 AG's is halted.