You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: azure-sql/managed-instance/connection-types-overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ This article explains how clients connect to Azure SQL Managed Instance dependin
22
22
Azure SQL Managed Instance's VNet-local endpoint supports the following two connection types:
23
23
24
24
-**Redirect (recommended):** This is the preferred way for SQL clients to connect to managed instances. With redirect, clients establish connections directly to the node hosting the database. To enable redirect, you need to configure firewalls and Network Security Group (NSG) rules to allow inbound access on ports 1433 and port range 11000-11999. Redirect exhibits superior latency and throughput performance compared to proxy. Redirect also minimizes the impact of planned maintenance events of the gateway component, since redirect connections, once established, have no dependency on the gateway. Redirection capability depends on SQL drivers to understand TDS (Tabular Data Stream) 7.4 or newer. TDS 7.4 was first published with Microsoft SQL Server 2012, so any client newer than that will work.
25
-
-**Proxy (default):** This is the legacy connectivity mechanism meant to support SQL drivers that implement TDS versions older than 7.4. In this mode, all connections are proxied through the internal gateway and only the port 1433 is required to be open. Depending on the nature of the workload, proxy mode can severely degrade the latency and lower the throughput compared to redirect. It is also more susceptible to the loss of live connections due to planned maintenance events of the gateway component. For this reason, we highly recommend you configure all your managed instances to use the redirect connection policy unless your SQL clients do not support TDS redirects.
25
+
-**Proxy (default):** This is the legacy connectivity mechanism meant to support SQL drivers that implement TDS versions older than 7.4. In this mode, all connections are proxied through the internal gateway and only the port 1433 is required to be open. In proxy method, the gateways process the instruction to locate the primary SQL replica node to forward the connection. Depending on the nature of this workload, gateways can bottleneck connectivity. Proxy mode can severely degrade the latency and lower the throughput compared to redirect as it is more susceptible to the loss of live connections due to planned maintenance events of the gateway component. For this reason, we **highly recommend** you configure all your managed instances to **use the redirect connection policy** unless your SQL clients do not support TDS redirects.
26
26
27
27
Note that redirect option only has effect on the VNet-local endpoint. Public endpoints and private endpoints to Azure SQL Managed Instance always operate in proxy mode.
Returns a row for each queue monitor in the instance. A queue monitor manages activation for a queue.
24
-
24
+
Returns a row for each queue monitor in the instance. A queue monitor manages activation for a queue.
25
+
26
+
| Column name | Data type | Description |
27
+
| --- | --- | --- |
28
+
|`database_id`|**int**| Object identifier for the database that contains the queue that the monitor watches. Nullable. |
29
+
|`queue_id`|**int**| Object identifier for the queue that the monitor watches. Nullable. |
30
+
|`state`|**nvarchar(32)**| State of the monitor. Nullable. This value is one of the following options:<br /><br />`INACTIVE`<br />`NOTIFIED`<br />`RECEIVES_OCCURRING`|
31
+
|`last_empty_rowset_time`|**datetime**| Last time that a `RECEIVE` from the queue returned an empty result. Nullable. |
32
+
|`last_activated_time`|**datetime**| Last time that this queue monitor activated a stored procedure. Nullable. |
33
+
|`tasks_waiting`|**int**| Number of sessions that are currently waiting within a `RECEIVE` statement for this queue. Nullable.<br /><br />**Note:** This number includes any session executing a receive statement, regardless of whether the queue monitor started the session. This is for when you use `WAITFOR` together with `RECEIVE`. In other words, these tasks are waiting for messages to arrive on the queue. |
34
+
35
+
## Permissions
36
+
37
+
[!INCLUDE [sssql19-md](../../includes/sssql19-md.md)] and earlier versions require `VIEW SERVER STATE` permission on the server.
38
+
39
+
[!INCLUDE [sssql22-md](../../includes/sssql22-md.md)] and later versions require `VIEW SERVER PERFORMANCE STATE` permission on the server.
|**database_id**|**int**|Object identifier for the database that contains the queue that the monitor watches. NULLABLE.|
29
-
|**queue_id**|**int**|Object identifier for the queue that the monitor watches. NULLABLE.|
30
-
|**state**|**nvarchar(32)**|State of the monitor. NULLABLE. This is one of the following:<br /><br /> **INACTIVE**<br /><br /> **NOTIFIED**<br /><br /> **RECEIVES_OCCURRING**|
31
-
|**last_empty_rowset_time**|**datetime**|Last time that a RECEIVE from the queue returned an empty result. NULLABLE.|
32
-
|**last_activated_time**|**datetime**|Last time that this queue monitor activated a stored procedure. NULLABLE.|
33
-
|**tasks_waiting**|**int**|Number of sessions that are currently waiting within a RECEIVE statement for this queue. NULLABLE.<br /><br /> Note: This number includes any session executing a receive statement, regardless of whether the queue monitor started the session. This is if you use WAITFOR together with RECEIVE. Basically, these tasks are waiting for messages to arrive on the queue.|
34
-
35
-
## Permissions
36
-
Requires VIEW SERVER STATE permission on the server.
37
-
38
-
### Permissions for SQL Server 2022 and later
45
+
This scenario provides the current status of all message queues.
39
46
40
-
Requires VIEW SERVER PERFORMANCE STATE permission on the server.
47
+
```sql
48
+
SELECT DB_NAME() AS [Database_Name],
49
+
s.[name] AS [Service_Name],
50
+
sch.[name] AS [Schema_Name],
51
+
q.[name] AS [Queue_Name],
52
+
ISNULL(m.[state], N'Not available') AS [Queue_State],
53
+
m.tasks_waiting,
54
+
m.last_activated_time,
55
+
m.last_empty_rowset_time,
56
+
(SELECTCOUNT(1)
57
+
FROMsys.transmission_queueAS t6
58
+
WHEREt6.from_service_name= s.[name]) AS Tran_Message_Count
59
+
FROMsys.servicesAS s
60
+
INNER JOINsys.databasesAS d
61
+
ONd.database_id= DB_ID()
62
+
INNER JOINsys.service_queuesAS q
63
+
ONs.service_queue_id= q.[object_id]
64
+
INNER JOINsys.schemasAS sch
65
+
ON q.[schema_id] = sch.[schema_id]
66
+
LEFT OUTER JOINsys.dm_broker_queue_monitorsAS m
67
+
ON q.[object_id] =m.queue_id
68
+
ANDm.database_id=d.database_id;
69
+
```
41
70
42
-
## Examples
43
-
44
-
### A. Current status queue monitor
45
-
This scenario provides the current status of all message queues.
46
-
47
-
```
48
-
SELECT t1.name AS [Service_Name], t3.name AS [Schema_Name], t2.name AS [Queue_Name],
49
-
CASE WHEN t4.state IS NULL THEN 'Not available'
50
-
ELSE t4.state
51
-
END AS [Queue_State],
52
-
CASE WHEN t4.tasks_waiting IS NULL THEN '--'
53
-
ELSE CONVERT(VARCHAR, t4.tasks_waiting)
54
-
END AS tasks_waiting,
55
-
CASE WHEN t4.last_activated_time IS NULL THEN '--'
56
-
ELSE CONVERT(varchar, t4.last_activated_time)
57
-
END AS last_activated_time ,
58
-
CASE WHEN t4.last_empty_rowset_time IS NULL THEN '--'
59
-
ELSE CONVERT(varchar,t4.last_empty_rowset_time)
60
-
END AS last_empty_rowset_time,
61
-
(
62
-
SELECT COUNT(*)
63
-
FROM sys.transmission_queue t6
64
-
WHERE (t6.from_service_name = t1.name) ) AS [Tran_Message_Count]
65
-
FROM sys.services t1 INNER JOIN sys.service_queues t2
66
-
ON ( t1.service_queue_id = t2.object_id )
67
-
INNER JOIN sys.schemas t3 ON ( t2.schema_id = t3.schema_id )
68
-
LEFT OUTER JOIN sys.dm_broker_queue_monitors t4
69
-
ON ( t2.object_id = t4.queue_id AND t4.database_id = DB_ID() )
70
-
INNER JOIN sys.databases t5 ON ( t5.database_id = DB_ID() );
71
-
```
72
-
73
-
## See Also
74
-
[Dynamic Management Views and Functions (Transact-SQL)](~/relational-databases/system-dynamic-management-views/system-dynamic-management-views.md)
75
-
[Service Broker Related Dynamic Management Views (Transact-SQL)](../../relational-databases/system-dynamic-management-views/service-broker-related-dynamic-management-views-transact-sql.md)
Copy file name to clipboardExpand all lines: docs/relational-databases/system-dynamic-management-views/sys-dm-pdw-exec-requests-transact-sql.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: sys.dm_pdw_exec_requests holds information about all requests curre
4
4
author: jacinda-eng
5
5
ms.author: jacindaeng
6
6
ms.reviewer: wiassaf, randolphwest
7
-
ms.date: 04/23/2024
7
+
ms.date: 10/14/2024
8
8
ms.service: sql
9
9
ms.subservice: data-warehouse
10
10
ms.topic: "reference"
@@ -66,15 +66,15 @@ The negative integer value in the `result_cache_hit` column is a bitmap value of
66
66
67
67
## Permissions
68
68
69
-
Requires `VIEW SERVER STATE` permission.
69
+
Requires `VIEW DATABASE STATE` permission.
70
70
71
71
## Security
72
72
73
-
`sys.dm_pdw_exec_requests` doesn't filter query results according to database-specific permissions. Logins with `VIEW SERVER STATE` permission can obtain results query results for all databases.
73
+
`sys.dm_pdw_exec_requests` doesn't filter query results according to database-specific permissions. Logins with `VIEW DATABASE STATE` permission can obtain results query results for all databases.
74
74
75
75
> [!WARNING]
76
-
> An attacker can use `sys.dm_pdw_exec_requests` to retrieve information about specific database objects by simply having `VIEW SERVER STATE` permission and by not having database-specific permission.
76
+
> An attacker can use `sys.dm_pdw_exec_requests` to retrieve information about specific database objects by simply having `VIEW DATABASE STATE` permission and by not having database-specific permission.
77
77
78
78
## Related content
79
79
80
-
-[Azure Synapse Analytics and Parallel Data Warehouse Dynamic Management Views (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sql-and-parallel-data-warehouse-dynamic-management-views.md)
80
+
-[Azure Synapse Analytics and Parallel Data Warehouse Dynamic Management Views (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sql-and-parallel-data-warehouse-dynamic-management-views.md)
The `MSagent_profiles` table contains one row for each defined replication agent profile. This table is stored in the `msdb` database on the Distributor.
24
+
25
+
| Column name | Data type | Description |
26
+
| --- | --- | --- |
27
+
|`profile_id`|**int**| The profile ID. |
28
+
|`profile_name`|**sysname**| The unique profile name for agent type. |
29
+
|`agent_type`|**int**| The type of agent:<br /><br />`1` = Snapshot Agent<br />`2` = Log Reader Agent<br />`3` = Distribution Agent<br />`4` = Merge Agent<br />`9` = Queue Reader Agent |
30
+
|`type`|**int**| The type of profile:<br /><br />`0` = System<br />`1` = Custom |
31
+
|`description`|**nvarchar(3000)**| The description of the profile. |
32
+
|`def_profile`|**bit**| Specifies whether this profile is the default for this agent type. |
0 commit comments