Skip to content

Commit a26e677

Browse files
authored
Merge pull request #10271 from MicrosoftDocs/MashaMSFT-patch-1
added IP examples
2 parents 66b8ad2 + 3d890a4 commit a26e677

3 files changed

Lines changed: 39 additions & 9 deletions

File tree

docs/t-sql/statements/alter-availability-group-transact-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ ALTER AVAILABILITY GROUP group_name
135135
}
136136

137137
<network_subnet_option> ::=
138-
'four_part_ipv4_address', 'four_part_ipv4_mask'
138+
'ipv4_address', 'ipv4_mask'
139139

140140
<ip_address_option> ::=
141141
{
@@ -555,10 +555,10 @@ Initiates a manual failover of the availability group without data loss to the s
555555

556556
`WITH IP ( ('10.120.19.155','255.255.254.0') )`
557557

558-
*four_part_ipv4_address*
558+
*ipv4_address*
559559
Specifies an IPv4 four-part address for an availability group listener. For example, `10.120.19.155`.
560560

561-
*four_part_ipv4_mask*
561+
*ipv4_mask*
562562
Specifies an IPv4 four-part mask for an availability group listener. For example, `255.255.254.0`.
563563

564564
*ipv6_address*

docs/t-sql/statements/create-availability-group-transact-sql.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ CREATE AVAILABILITY GROUP group_name
9898
}
9999

100100
<network_subnet_option> ::=
101-
'four_part_ipv4_address', 'four_part_ipv4_mask'
101+
'ip4_address', 'four_part_ipv4_mask'
102102

103103
<ip_address_option> ::=
104104
{
105-
'four_part_ipv4_address', 'four_part_ipv4_mask'
105+
'ip4_address', 'pv4_mask'
106106
| 'ipv6_address'
107107
}
108108

@@ -454,10 +454,10 @@ CREATE AVAILABILITY GROUP group_name
454454

455455
`WITH IP ( ('10.120.19.155','255.255.254.0') )`
456456

457-
*four_part_ipv4_address*
457+
*ip4_address*
458458
Specifies an IPv4 four-part address for an availability group listener. For example, `10.120.19.155`.
459459

460-
*four_part_ipv4_mask*
460+
*ipv4_mask*
461461
Specifies an IPv4 four-part mask for an availability group listener. For example, `255.255.254.0`.
462462

463463
*ipv6_address*

docs/t-sql/statements/create-endpoint-transact-sql.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ FOR { TSQL | SERVICE_BROKER | DATABASE_MIRRORING } (
6767
<AS TCP_protocol_specific_arguments> ::=
6868
AS TCP (
6969
LISTENER_PORT = listenerPort
70-
[ [ , ] LISTENER_IP = ALL | ( 4-part-ip ) | ( "ip_address_v6" ) ]
70+
[ [ , ] LISTENER_IP = ALL | ( xx.xx.xx.xx IPv4 address ) | ( '__:__1' IPv6 address ) ]
7171
7272
)
7373
@@ -271,7 +271,7 @@ FOR DATABASE_MIRRORING (
271271
### Creating a database mirroring endpoint
272272
The following example creates a database mirroring endpoint. The endpoint uses port number `7022`, although any available port number would work. The endpoint is configured to use Windows Authentication using only Kerberos. The `ENCRYPTION` option is configured to the nondefault value of `SUPPORTED` to support encrypted or unencrypted data. The endpoint is being configured to support both the partner and witness roles.
273273

274-
```
274+
```sql
275275
CREATE ENDPOINT endpoint_mirroring
276276
STATE = STARTED
277277
AS TCP ( LISTENER_PORT = 7022 )
@@ -281,6 +281,36 @@ CREATE ENDPOINT endpoint_mirroring
281281
ROLE=ALL);
282282
GO
283283
```
284+
285+
### Create a new endpoint pointing to a specific IPv4 address and port
286+
287+
```sql
288+
CREATE ENDPOINT ipv4_endpoint_special
289+
STATE = STARTED
290+
AS TCP (
291+
LISTENER_PORT = 55555, LISTENER_IP = (10.0.75.1)
292+
)
293+
FOR TSQL ();
294+
295+
GRANT CONNECT ON ENDPOINT::[TSQL Default TCP] TO public; -- Keep existing public permission on default endpoint for demo purpose
296+
GRANT CONNECT ON ENDPOINT::ipv4_endpoint_special
297+
TO login_name;
298+
```
299+
300+
### Create a new endpoint pointing to a specific IPv6 address and port
301+
302+
```sql
303+
CREATE ENDPOINT ipv6_endpoint_special
304+
STATE = STARTED
305+
AS TCP (
306+
LISTENER_PORT = 55555, LISTENER_IP = ('::1')
307+
)
308+
FOR TSQL ();
309+
310+
GRANT CONNECT ON ENDPOINT::[TSQL Default TCP] TO public;
311+
GRANT CONNECT ON ENDPOINT::ipv6_endpoint_special
312+
313+
```
284314

285315
## See also
286316
[ALTER ENDPOINT &#40;Transact-SQL&#41;](../../t-sql/statements/alter-endpoint-transact-sql.md)

0 commit comments

Comments
 (0)