Can two primary AlwaysOn servers be each other's secondary?

We have a situation where our primary disaster recovery site it also a valid hospital satellite (SQLB) to our main campus hospital (SQLA) in town. The same application (XAPP) is using a local database at each respective site as shown in Figure A.

In theory a disaster "could" occur at each site. So the main campus could be the DR for the satellite site and vice versa. Can AlwaysOn be used to allow each SQL Server to store the other's secondary database/replica? And, even if this is possible, is it a good idea?

Figure A: Can SQLA be the primary for SQLB's databases and vice versa?

enter image description here

  • 1
    One of the drawbacks to this setup could be that you can save money on your licensing costs by only licensing one 'active' host. Doing this will mean that you can only do production tasks on the active server. Commented Oct 29, 2018 at 14:14

1 Answer 1


Yes, it is possible to have two availability groups configured in this manner. Each availability group has its own settings in regard to failover policies, so you can set up one availability group to be primary on SQLA, and configure SQLB for manual failover. So when SQLA reboots, the AG goes offline, but doesn't fail over to SQLB unless you manually fail it over. When SQLA comes back online, it takes ownership of the AG and brings the database online and continues on just as before.

The second availability group would be configured to be primary on SQLB, and SQLA would be set for manual failover.

This is a completely reasonable setup and makes sense in a scenario where both sites have production databases in use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.