Introduction
In
our existing SQL Server Always On configuration, we had a two-node setup, with each node hosted in a separate data center, and a single witness located in the secondary (DR) data center. Due to our application's design requirements,
the availability group was configured for manual failover.
However,
this architecture introduced a critical limitation: when the DR DC went offline, we lost quorum, and the Always On configuration
became unusable. As a result, we were forced to disable and delete the
availability group, and then recreate it from scratch, including
re-adding all databases—an error-prone and time-consuming process.
To
overcome this limitation and ensure high availability across both data centers,
we implemented a more resilient architecture: two file-share
witnesses—one in each data center—combined with a DNS CNAME record to
abstract the witness name. This solution provides redundancy for the quorum
configuration and allows the availability group to survive the failure of
either data center without needing to rebuild the setup.
In
these two blogs, I will walk you through how we built a more resilient Always
On architecture. In Part 1 (SQL Server Always On Across Two Data centers with Dual Witnesses and DNS CNAME), I’ll explain the setup of dual file
share witnesses across two data centers, along with the use of a DNS CNAME to
manage quorum effectively. In Part 2 (SQL Server Always On Across Two Datacenters: Manual and Automatic Failover Testing), I’ll demonstrate how we
tested failover in both manual and automatic modes—simulating complete failure
of either the primary or secondary data center—and show how this architecture
ensures availability without needing to rebuild the configuration.