Skip to content

Commit 234c5c0

Browse files
author
Rohit Nayak
committed
MOdified Allow Azure section for Data Sync & deleted the Auditing section
1 parent 9413237 commit 234c5c0

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

articles/sql-database/sql-database-networkaccess-overview.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,40 @@ You can work around the problem by running the BACPAC import or export directly
5555

5656
The Azure SQL Database Query Editor is deployed on VMs in Azure. These VMs are not in your VNet. Therefore the VMs get an Azure IP when connecting to your database. On removing **Allow Azure services to access server**, these VMs will not be able to access your databases.
5757

58-
### Table Auditing
59-
60-
At present, there are two ways to enable auditing on your SQL Database. Table auditing fails after you have enabled service endpoints on your Azure SQL Server. Mitigation here is to move to Blob auditing.
61-
6258
### Impact on Data Sync
6359

6460
Azure SQL Database has the Data Sync feature that connects to your databases using Azure IPs. When using service endpoints, you will turn off **Allow Azure services to access server** access to your SQL Database server and will break the Data Sync feature.
6561

62+
To use the Data sync feature with **Allow Azure services to access server** set to OFF, you need to create individual firewall rule entries to [add IP addresses](sql-database-server-level-firewall-rule.md) covered under the SQL **service tag**
63+
64+
The following PowerShell script shows how to enumerate the IP address range that is under the SQL service tag
65+
```powershell
66+
PS C:\> $serviceTags = Get-AzNetworkServiceTag -Location eastus2
67+
PS C:\> $sql = $serviceTags.Values | Where-Object { $_.Name -eq "Sql.WestUS" }
68+
PS C:\> $sql.Properties.AddressPrefixes.Count
69+
70
70+
PS C:\> $sql.Properties.AddressPrefixes
71+
13.86.216.0/25
72+
13.86.216.128/26
73+
13.86.216.192/27
74+
13.86.217.0/25
75+
13.86.217.128/26
76+
13.86.217.192/27
77+
```
78+
79+
> [!TIP]
80+
> Get-AzNetworkServiceTag returns the global range for SQL Service Tag. Be sure to filter it to the region that hosts the databases using Data Sync
81+
82+
Note that the output of the PowerShell script is in Classless Inter Domain Routing(CIDR) notation.
83+
Use [Get-IPrangeStartEnd.ps1](https://gallery.technet.microsoft.com/scriptcenter/Start-and-End-IP-addresses-bcccc3a9) to convert from CIDR notation to Start and End IP addresses- which you can then enter as firewall rules.
84+
85+
```powershell
86+
PS C:\> Get-IPrangeStartEnd -ip 52.229.17.93 -cidr 26
87+
start end
88+
----- ---
89+
52.229.17.64 52.229.17.127
90+
```
91+
6692
## IP firewall rules
6793
Ip based firewall is a feature of Azure SQL Server that prevents all access to your database server until you explicitly [add IP addresses](sql-database-server-level-firewall-rule.md) of the client machines.
6894

0 commit comments

Comments
 (0)