Disaster Recovery – How to Connect to DR Server if PROD Site is Down

availability-groupsdisaster recoverysql serversql server 2014

I have two servers in one DataCenterA (PRODUCTION SQL SERVERS AOAGs) and one server in another DatacenterB (DR BCP AOAGs).What if DataCenterA is completely Down.Now how can I let the Application stay Online.My SQL Servers has AlwaysOn Availability Groups.Can I connect to application by changing the connection string as "SQL\Instancename" in web.config file or using BCP AOAGs Listener which we created for AlwaysOn AGs BCP Listener ?
Please Guide me on this.

Best Answer

If you have:

  • 2 Datacenters
  • 1 Server in Each DC
  • Using SQL Server AlwaysOn Availability Groups

Then the following happens:

  • The Primary Datacenter Goes Down, Completely

How do you continue business continuity?

Assuming that the Availability Replicas are both set to Synchronous...

  1. Quorum will have most likely been lost - you'll need to force quorum on the server in the DC that is still up. This can be completed a variety of ways. Powershell: Start-ClusterNode -FixQuorum , services: net start clussvc /fq , etc.
  2. Connect to SQL Server now that the cluster was forced quorum. Failover the Availability Group. This will bring the listener with it. Whether Synchronous or Asynchronous is set, this can be accomplished by executing ALTER VAILABILITY GROUP [Name] FORCE_FAILOVER_ALLOW_DATA_LOSS
  3. Test connectivity.

Depending on the settings of the listener in the windows cluster, your clients may need to flush their dns cache (to pickup the new ip if they are legacy clients).

Once the first DC comes back online we'll want to make sure to reconfigure and re-evaluate the situation.

Resources that will help you: