Sql-server – SQL Server – Is there a limit to the number of Distributed Availability Groups that a primary replica can participate in

availability-groupsdistributed-availability-groupssql server

The documentation has diagrams with availability groups taking part in multiple Distributed Availability Groups (AG 1, AG 2 and AG 3) take part in Distibuted AG1 ([AG 1, AG 2]) and Distributed AG2 ([AG 2, AG 3]).

Is there a limit to this?

The documentation says "As long as two availability groups can communicate, you can configure a distributed availability group with them".

The documentation also says "In other words, a primary replica can participate in two different distributed availability groups"

Is 'two' the max? Or just used for the purpose of illustrating that there can be more than one. Can a primary replica participate in three different DAGs?

The book "Pro SQL Server Always On Availability Groups" says that an availability group can be a member of more than one distributed availability group, it does not explicitly say two. https://link.springer.com/book/10.1007%2F978-1-4842-2071-9

Best Answer

You are misreading that document. In the document and image you are referring to - there are actually two distributed Availability Groups in the image you refer to. each one containing two Availability Groups.

A distributed Availability Group is distributed between two (and as far as I now - only two) Availability Groups.

You can have multiple secondaries in an Availability Group and they can span data centers, so depending on what you are trying to do, you may not need a Distributed Availability Group to do it.