Skip to content

Commit 1e4f11f

Browse files
committed
Update to reduce H2s
1 parent be62483 commit 1e4f11f

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

docs/database-engine/availability-groups/windows/configure-distributed-availability-groups.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ To create a distributed availability group, you must create an availability grou
2222

2323
For a technical overview of distributed availability groups, see [Distributed availability groups](distributed-availability-groups.md).
2424

25-
## Set the endpoint listeners to listen to all IP addresses
25+
## Prerequisites
26+
27+
### Set the endpoint listeners to listen to all IP addresses
2628

2729
Make sure the endpoints can communicate between the different availability groups in the distributed availability group. If one availability group is set to a specific network on the endpoint, the distributed AG will not work properly. On each server that will host a replica in the distributed availability group, configure the listener to `LISTENER_IP = ALL`.
2830

29-
### Create a listener to listen to all IP addresses
31+
#### Create a listener to listen to all IP addresses
3032

3133
For example, the following script creates a listener endpoint on TCP port 5022 that listens on all IP addresses.
3234

@@ -42,7 +44,7 @@ FOR DATA_MIRRORING (
4244
GO
4345
```
4446

45-
### Alter a listener to listen to all IP addresses
47+
#### Alter a listener to listen to all IP addresses
4648

4749
For example, the following script changes a listener endpoint to listen on all IP addresses.
4850

@@ -52,7 +54,9 @@ ALTER ENDPOINT [aodns-hadr]
5254
GO
5355
```
5456

55-
## Create the primary availability group on the first cluster
57+
## Create first availability group
58+
59+
### Create the primary availability group on the first cluster
5660
Create an availability group on the first WSFC. In this example, the availability group is named `ag1` for the database `db1`.
5761

5862
```tsql
@@ -76,7 +80,7 @@ GO
7680

7781
Note that this example uses direct seeding, where **SEEDING_MODE** is set to **AUTOMATIC** for both the replicas and the distributed availability group. This means that once established, the secondary replicas and secondary availability group will be automatically populated without requiring a manual backup and restore of primary database.
7882

79-
## Join the secondary replicas to the primary availability group
83+
### Join the secondary replicas to the primary availability group
8084
Any secondary replicas must be joined to the availability group with **ALTER AVAILABILITY GROUP** with the **JOIN** option. Because direct seeding is used in this example, you must also call **ALTER AVAILABILITY GROUP** with the **GRANT CREATE ANY DATABASE** option. This allows the availability group to create the database and begin seeding it automatically from the primary replica.
8185

8286
In this example, the following commands are run on the secondary replica, `server2`, to join the `ag1` availability group. The availability group is then permitted to create databases on the secondary.
@@ -87,7 +91,7 @@ ALTER AVAILABILITY GROUP [ag1] GRANT CREATE ANY DATABASE
8791
GO
8892
```
8993

90-
## Create a listener for the primary availability group
94+
### Create a listener for the primary availability group
9195

9296
Next add a listener for the primary availability group on the first WSFC. In this example, the listener is named `ag1-listener`. For detailed instructions on creating a listener, see [Create or Configure an Availability Group Listener (SQL Server)](../../../database-engine/availability-groups/windows/create-or-configure-an-availability-group-listener-sql-server.md).
9397

@@ -97,7 +101,8 @@ ALTER AVAILABILITY GROUP [ag1]
97101
GO
98102
```
99103

100-
## Create the secondary availability group on the second cluster
104+
105+
## Create second availability group
101106
Then on the second WSFC, create a second availability group, `ag2`. In this case, the database is not specified, because it will be automatically seeded from the primary availability group.
102107

103108
```tsql
@@ -121,7 +126,7 @@ GO
121126
> [!NOTE]
122127
> Note that the secondary availability group must use the same database mirroring endpoint (in this example port 5022). Otherwise, replication will stop after a local failover.
123128
124-
## Join the secondary replicas to the secondary availability group
129+
### Join the secondary replicas to the secondary availability group
125130
In this example, the following commands are run on the secondary replica, `server4`, to join the `ag2` availability group. The availability group is then permitted to create databases on the secondary to support direct seeding.
126131

127132
```tsql
@@ -130,7 +135,7 @@ ALTER AVAILABILITY GROUP [ag2] GRANT CREATE ANY DATABASE
130135
GO
131136
```
132137

133-
## Create a listener for the secondary availability group
138+
### Create a listener for the secondary availability group
134139
Next add a listener for the secondary availability group on the second WSFC. In this example, the listener is named `ag2-listener`. For detailed instructions on creating a listener, see [Create or Configure an Availability Group Listener (SQL Server)](../../../database-engine/availability-groups/windows/create-or-configure-an-availability-group-listener-sql-server.md).
135140

136141
```
@@ -139,7 +144,7 @@ ALTER AVAILABILITY GROUP [ag2]
139144
GO
140145
```
141146

142-
## Create the distributed availability group on the first cluster
147+
## Create distributed availability group on first cluster
143148
On the first WSFC, create a distributed availability group (named `distributedag` in this example). Use the **CREATE AVAILABILITY GROUP** command with the **DISTRIBUTED** option. The **AVAILABILITY GROUP ON** parameter specifies the member availability groups, `ag1` and `ag2`.
144149

145150
```tsql
@@ -166,7 +171,7 @@ GO
166171
> [!NOTE]
167172
> The **LISTENER_URL** specifies the listener for each availability group along with the database mirroring endpoint of the availability group. In this example, that is port `5022` (not port `60173` used to create the listener).
168173
169-
## Join the distributed availability group on the second cluster
174+
## Join distributed availability group on second cluster
170175
Then join the distributed availability group on the second WSFC.
171176

172177
```tsql
@@ -275,7 +280,7 @@ After completing the steps above, the distributed availability group fails over
275280
DROP AVAILABILITY GROUP [distributedag]
276281
```
277282

278-
## Create a distributed availability group with failover cluster instances
283+
## Create distributed availability group on failover cluster instances
279284

280285
You can create a distributed availability group using an availability group on a failover cluster instance (FCI). In this case, you don't need an availability group listener. Use the virtual network name (VNN) for the primary replica of the FCI instance. The following example shows a distributed availability group called SQLFCIDAG. One availability group is SQLFCIAG. SQLFCIAG has 2 FCI replicas. The VNN for the primary FCI replica is SQLFCIAG-1, and the VNN for the secondary FCI replica is SQLFCIAG-2. The distributed availability group also includes SQLAG-DR, for disaster recovery.
281286

0 commit comments

Comments
 (0)