Sample Header Ad - 728x90

Removing specific databases from a secondary Availability Group in a Distributed Availability Group setup

0 votes
1 answer
243 views
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!
Asked by Just a learner (2082 rep)
Apr 20, 2024, 08:35 PM
Last activity: Apr 21, 2024, 11:04 AM