Skip to content

Commit fbf15fd

Browse files
Clarified SQL Server connectivity requirements
1 parent 6e480a2 commit fbf15fd

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

articles/azure-monitor/insights/sql-insights-enable.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Enable SQL insights in Azure Monitor
44
ms.topic: conceptual
55
author: bwren
66
ms.author: bwren
7-
ms.date: 11/5/2021
7+
ms.date: 1/18/2022
88
---
99

1010
# Enable SQL insights (preview)
@@ -226,6 +226,8 @@ Get the details from the **Connection strings** menu item for the managed instan
226226
To monitor a readable secondary, include the key-value `ApplicationIntent=ReadOnly` in the connection string. SQL Insights supports monitoring of a single secondary. Collected data will be tagged to reflect Primary or Secondary.
227227

228228
#### SQL Server
229+
The TCP/IP protocol must be enabled for the SQL Server instance you want to monitor. TCP connections from the monitoring machine to the IP address and port used by the SQL Server instance must be allowed by any firewalls or [network security groups](../virtual-network/network-security-groups-overview.md) (NSGs) that may exist on the network path.
230+
229231
Enter the connection string in the form:
230232

231233
```
@@ -234,10 +236,22 @@ Enter the connection string in the form:
234236
]
235237
```
236238

237-
If your monitoring virtual machine is in the same VNET, use the private IP address of the Server. Otherwise, use the public IP address. If you're using Azure SQL virtual machine, you can see which port to use here on the **Security** page for the resource.
239+
If your monitoring virtual machine is in the same VNET, use the private IP address of the Server. Otherwise, use the public IP address.
240+
241+
If your SQL Server instance is configured to listen on a non-default port, replace 1433 with that port number in the connection string. If you're using Azure SQL virtual machine, you can see which port to use on the **Security** page for the resource.
238242

239243
:::image type="content" source="media/sql-insights-enable/sql-vm-security.png" alt-text="SQL virtual machine security" lightbox="media/sql-insights-enable/sql-vm-security.png":::
240244

245+
For any SQL Server instance, you can determine all IP addresses and ports it is listening on by connecting to the instance and executing the following T-SQL query, as long as there is at least one TCP connection to the instance:
246+
247+
```sql
248+
SELECT DISTINCT local_net_address, local_tcp_port
249+
FROM sys.dm_exec_connections
250+
WHERE net_transport = 'TCP'
251+
AND
252+
protocol_type = 'TSQL';
253+
```
254+
241255
## Monitoring profile created
242256

243257
Select **Add monitoring virtual machine** to configure the virtual machine to collect data from your SQL resources. Do not return to the **Overview** tab. In a few minutes, the Status column should change to read "Collecting", you should see data for the SQL resources you have chosen to monitor.

0 commit comments

Comments
 (0)