0

I recently set up a Distributed Availability Group (DAG) between an existing on-premises Always On Availability Group (AG) and a new AG in AWS. The on-premises AG serves as the primary, while the AWS AG acts as the secondary. I inadvertently configured automatic seeding without realizing that it would start seeding all the databases immediately.

My issue is that I only need to replicate about 10 databases to the secondary AG, and out of those, only five databases need to be replicated to the secondary replica of the secondary AG. I tried setting "HADR OFF" for the unwanted databases, but it only works on the secondary replica. The command runs successfully on the forwarder, but the databases never actually get removed.

I've found several articles explaining how to remove a database from a DAG, but they all suggest running the commands from the primary replica of the primary AG. However, I'm concerned that this approach might remove the database from the on-premises AG as well, which is not my intention. I only want to remove the databases from the secondary replica of the secondary distribution AG.

So, my questions are:

  • Has anyone encountered a similar situation or knows how to remove specific databases from the secondary AG in a DAG setup without affecting the primary AG?
  • If I remove the DAG and start over, but choose to seed manually, would that allow me to select which databases get replicated via the DAG?

I would greatly appreciate any insights, suggestions, or step-by-step guidance on how to achieve this. Thank you in advance for your help!

1 Answer 1

2

Has anyone encountered a similar situation or knows how to remove specific databases from the secondary AG in a DAG setup without affecting the primary AG?

Whatever databases are put into an Availability Group need to have a copy on each replica. This is also the case with Distributed Availability Groups, as they are copies of regular AGs and thus should have all databases on all replicas.

What you're proposing would require you to create multiple AGs and put only the databases you want in the Distributed AG in its own AG and create the Distributed over just that AG.

Removing databases from just the forwarder side will make the Distributed AG (which is an AG itself) believe that the databases are not synchronizing properly and unhealthy. This will cause other upstream effects on the primary side and is not supported.

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.