Skip to content

Commit 616f08f

Browse files
author
PRMerger7
authored
Merge pull request MicrosoftDocs#2446 from MikeRayMSFT/20170713_DistributedAG_IP_ALL
Fix items mentioned in PR 2426
2 parents 5c046f6 + 1e4f11f commit 616f08f

File tree

1 file changed

+32
-23
lines changed

1 file changed

+32
-23
lines changed

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

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Configure distributed Availability Groups (Always On Availability Groups) | Microsoft Docs"
2+
title: "Configure distributed availability group (Always On Availability Group) | Microsoft Docs"
33
ms.custom: ""
44
ms.date: "07/12/2017"
55
ms.prod: "sql-server-2016"
@@ -18,15 +18,17 @@ manager: "jhubbard"
1818

1919
# Configure distributed availability group
2020

21-
To create a distributed availability group, you must create an availability group and listener on each WSFC. You then combine these into a distributed availability group. The following steps provide a basic example in Transact-SQL. This example does not cover all of the details of creating availability groups and listeners; instead, it focuses on highlighting the key requirements.
21+
To create a distributed availability group, you must create an availability group and listener on each Windows Server Failover Cluster (WSFC). You then combine these into a distributed availability group. The following steps provide a basic example in Transact-SQL. This example does not cover all of the details of creating availability groups and listeners; instead, it focuses on highlighting the key requirements.
2222

23-
For a technical overview of distributed availability groups, see [Distributed Availability Groups](distributed-availability-groups.md).
23+
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
2626

27-
On each server that will host a replica in the distributed availability group, configure the listener to `LISTENER_IP = ALL`. The listeners on each server cannot listen to a specific IP address because the endpoint listener must listen to traffic coming over the server IP address as well as the listener IP address.
27+
### Set the endpoint listeners to listen to all IP addresses
2828

29-
### Create a listener to listen to all IP addresses
29+
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`.
30+
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,8 +54,9 @@ ALTER ENDPOINT [aodns-hadr]
5254
GO
5355
```
5456

57+
## Create first availability group
5558

56-
## Create the primary availability group on the first cluster
59+
### Create the primary availability group on the first cluster
5760
Create an availability group on the first WSFC. In this example, the availability group is named `ag1` for the database `db1`.
5861

5962
```tsql
@@ -77,7 +80,7 @@ GO
7780

7881
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.
7982

80-
## Join the secondary replicas to the primary availability group
83+
### Join the secondary replicas to the primary availability group
8184
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.
8285

8386
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.
@@ -88,7 +91,7 @@ ALTER AVAILABILITY GROUP [ag1] GRANT CREATE ANY DATABASE
8891
GO
8992
```
9093

91-
## Create a listener for the primary availability group
94+
### Create a listener for the primary availability group
9295

9396
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).
9497

@@ -98,7 +101,8 @@ ALTER AVAILABILITY GROUP [ag1]
98101
GO
99102
```
100103

101-
## Create the secondary availability group on the second cluster
104+
105+
## Create second availability group
102106
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.
103107

104108
```tsql
@@ -122,7 +126,7 @@ GO
122126
> [!NOTE]
123127
> 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.
124128
125-
## Join the secondary replicas to the secondary availability group
129+
### Join the secondary replicas to the secondary availability group
126130
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.
127131

128132
```tsql
@@ -131,7 +135,7 @@ ALTER AVAILABILITY GROUP [ag2] GRANT CREATE ANY DATABASE
131135
GO
132136
```
133137

134-
## Create a listener for the secondary availability group
138+
### Create a listener for the secondary availability group
135139
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).
136140

137141
```
@@ -140,7 +144,7 @@ ALTER AVAILABILITY GROUP [ag2]
140144
GO
141145
```
142146

143-
## Create the distributed availability group on the first cluster
147+
## Create distributed availability group on first cluster
144148
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`.
145149

146150
```tsql
@@ -167,7 +171,7 @@ GO
167171
> [!NOTE]
168172
> 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).
169173
170-
### Join the distributed availability group on the second cluster
174+
## Join distributed availability group on second cluster
171175
Then join the distributed availability group on the second WSFC.
172176

173177
```tsql
@@ -241,9 +245,10 @@ Only manual failover is supported at this time. The following Transact-SQL state
241245
ALTER AVAILABILITY GROUP distributedag SET (ROLE = SECONDARY);
242246
```
243247
244-
Note: at this point, the distributed availability group is not available.
248+
>[NOTE!]
249+
>At this point, the distributed availability group is not available.
245250
246-
1. Test the failover readiness. Run the following quey:
251+
1. Test the failover readiness. Run the following query:
247252
248253
```tsql
249254
SELECT ag.name,
@@ -262,7 +267,9 @@ Only manual failover is supported at this time. The following Transact-SQL state
262267
```tsql
263268
ALTER AVAILABILITY GROUP distributedag FORCE_FAILOVER_ALLOW_DATA_LOSS;
264269
```
265-
Note: After this step, the distributed availability group is available.
270+
271+
>[NOTE!]
272+
>After this step, the distributed availability group is available.
266273
267274
After completing the steps above, the distributed availability group fails over without any data loss. Microsoft recommends changing the availability mode back to ASYNCHRONOUS_COMMIT if the availability groups are across a geographical distance that causes latency.
268275
@@ -273,7 +280,7 @@ After completing the steps above, the distributed availability group fails over
273280
DROP AVAILABILITY GROUP [distributedag]
274281
```
275282

276-
## Create a Distributed Availability Group with Failover Cluster Instances
283+
## Create distributed availability group on failover cluster instances
277284

278285
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.
279286

@@ -303,11 +310,12 @@ CREATE AVAILABILITY GROUP [SQLFCIDAG]
303310
);
304311
```
305312

306-
Note that the listener URL is the VNN of the primary FCI instance.
313+
>[NOTE!]
314+
>The listener URL is the VNN of the primary FCI instance.
307315
308-
## Manually Failover FCI in Distributed Availability Group
316+
## Manually fail over FCI in distributed availability group
309317

310-
To manually failover the FCI availability group, update the distributed availability group to reflect the change of listener URL. For example, run the following DDL on both the primary AG and the secondary AG of SQLFCIAG:
318+
To manually fail over the FCI availability group, update the distributed availability group to reflect the change of listener URL. For example, run the following DDL on both the primary AG and the secondary AG of SQLFCIAG:
311319

312320
```tsql
313321
ALTER AVAILABILITY GROUP [SQLFCIDAG]
@@ -318,7 +326,8 @@ ALTER AVAILABILITY GROUP [SQLFCIDAG]
318326
)
319327
```
320328

321-
## See Also
329+
## Next steps
330+
322331
[CREATE AVAILABILITY GROUP (Transact-SQL)](../../../t-sql/statements/create-availability-group-transact-sql.md)
323332
[ALTER AVAILABILITY GROUP (Transact-SQL)](../../../t-sql/statements/alter-availability-group-transact-sql.md)
324333

0 commit comments

Comments
 (0)