Skip to content

Commit 328a7e7

Browse files
authored
Merge pull request #19469 from julieMSFT/20210602_dmvs6
updates to DMVs for Azure Synapse
2 parents cca87d8 + 8f2dd74 commit 328a7e7

8 files changed

Lines changed: 29 additions & 20 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This syntax is not supported by dedicated SQL pool in Azure Synapse Analytics.

docs/relational-databases/system-dynamic-management-views/sys-dm-exec-connections-transact-sql.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,17 @@ helpviewer_keywords:
2020
ms.assetid: 6bd46fe1-417d-452d-a9e6-5375ee8690d8
2121
author: WilliamDAssafMSFT
2222
ms.author: wiassaf
23-
monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current"
23+
monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current|| = azure-sqldw-latest"
2424
---
2525
# sys.dm_exec_connections (Transact-SQL)
26-
[!INCLUDE [SQL Server SQL Database](../../includes/applies-to-version/sql-asdb.md)]
2726

28-
Returns information about the connections established to this instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] and the details of each connection. Returns server wide connection information for SQL Server. Returns current database connection information for SQL Database.
29-
27+
[!INCLUDE [sql-asdb-asa](../../includes/applies-to-version/sql-asdb-asa.md)]
28+
29+
Returns information about the connections established to this instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] and the details of each connection. Returns server wide connection information for SQL Server. Returns current database connection information for SQL Database.
30+
31+
> [!NOTE]
32+
> To call this from dedicated SQL pool in [!INCLUDE[ssSDWfull](../../includes/sssdwfull-md.md)] or [!INCLUDE[ssPDW](../../includes/sspdw-md.md)], see [sys.dm_pdw_exec_connections (Transact-SQL)](sys-dm-pdw-exec-connections-transact-sql.md). For serverless SQL pool use **sys.dm_exec_connections**.
33+
3034
|Column name|Data type|Description|
3135
|-----------------|---------------|-----------------|
3236
|session_id|**int**|Identifies the session associated with this connection. Is nullable.|

docs/relational-databases/system-dynamic-management-views/sys-dm-exec-query-stats-transact-sql.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ Returns aggregate performance statistics for cached query plans in [!INCLUDE[ssN
2929

3030
> [!NOTE]
3131
> - The results of **sys.dm_exec_query_stats** may vary with each execution as the data only reflects finished queries, and not ones still in-flight.
32-
> - To call this from [!INCLUDE[ssSDWfull](../../includes/sssdwfull-md.md)] or [!INCLUDE[ssPDW](../../includes/sspdw-md.md)], use the name **sys.dm_pdw_nodes_exec_query_stats**. [!INCLUDE[synapse-analytics-od-unsupported-syntax](../../includes/synapse-analytics-od-unsupported-syntax.md)]
33-
32+
> - To call this from dedicated SQL pool in [!INCLUDE[ssSDWfull](../../includes/sssdwfull-md.md)] or [!INCLUDE[ssPDW](../../includes/sspdw-md.md)], use the name **sys.dm_pdw_nodes_exec_query_stats**. For serverless SQL pool use **sys.dm_exec_query_stats**.
3433
3534
|Column name|Data type|Description|
3635
|-----------------|---------------|-----------------|

docs/relational-databases/system-dynamic-management-views/sys-dm-exec-requests-transact-sql.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ ms.assetid: 4161dc57-f3e7-4492-8972-8cfb77b29643
2020
author: pmasl
2121
ms.author: pelopes
2222
ms.reviewer: sstein
23-
monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current"
23+
monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current|| = azure-sqldw-latest"
2424
---
2525
# sys.dm_exec_requests (Transact-SQL)
2626

27-
[!INCLUDE [SQL Server SQL Database](../../includes/applies-to-version/sql-asdb.md)]
27+
[!INCLUDE [sql-asdb-asa](../../includes/applies-to-version/sql-asdb-asa.md)]
2828

2929
Returns information about each request that is executing in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. For more information about requests, see the [Thread and Task Architecture Guide](../../relational-databases/thread-and-task-architecture-guide.md).
30-
30+
31+
> [!NOTE]
32+
> To call this from dedicated SQL pool in [!INCLUDE[ssSDWfull](../../includes/sssdwfull-md.md)] or [!INCLUDE[ssPDW](../../includes/sspdw-md.md)], see [sys.dm_pdw_exec_requests (Transact-SQL)](sys-dm-pdw-exec-requests-transact-sql.md). For serverless SQL pool use `sys.dm_exec_requests`.
33+
3134
|Column name|Data type|Description|
3235
|-----------------|---------------|-----------------|
3336
|session_id|**smallint**|ID of the session to which this request is related. Is not nullable.|

docs/relational-databases/system-dynamic-management-views/sys-dm-exec-sessions-transact-sql.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||
2525
# sys.dm_exec_sessions (Transact-SQL)
2626
[!INCLUDE [sql-asdb-asa-pdw](../../includes/applies-to-version/sql-asdb-asa-pdw.md)]
2727

28-
Returns one row per authenticated session on [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. sys.dm_exec_sessions is a server-scope view that shows information about all active user connections and internal tasks. This information includes client version, client program name, client login time, login user, current session setting, and more. Use sys.dm_exec_sessions to first view the current system load and to identify a session of interest, and then learn more information about that session by using other dynamic management views or dynamic management functions.
28+
Returns one row per authenticated session on [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. `sys.dm_exec_sessions` is a server-scope view that shows information about all active user connections and internal tasks. This information includes client version, client program name, client login time, login user, current session setting, and more. Use `sys.dm_exec_sessions` to first view the current system load and to identify a session of interest, and then learn more information about that session by using other dynamic management views or dynamic management functions.
29+
2930

30-
The sys.dm_exec_connections, sys.dm_exec_sessions, and sys.dm_exec_requests dynamic management views map to the [sys.sysprocesses](../../relational-databases/system-compatibility-views/sys-sysprocesses-transact-sql.md) system table.
31+
The `sys.dm_exec_connections`, `sys.dm_exec_sessions`, and `sys.dm_exec_requests` dynamic management views map to the deprecated [sys.sysprocesses](../../relational-databases/system-compatibility-views/sys-sysprocesses-transact-sql.md) system compatibility view.
32+
3133

32-
> **NOTE:** To call this from [!INCLUDE[ssSDWfull](../../includes/sssdwfull-md.md)] or [!INCLUDE[ssPDW](../../includes/sspdw-md.md)], use the name **sys.dm_pdw_nodes_exec_sessions**. [!INCLUDE[synapse-analytics-od-unsupported-syntax](../../includes/synapse-analytics-od-unsupported-syntax.md)]
34+
> [!NOTE]
35+
> To call this from dedicated SQL pool in [!INCLUDE[ssSDWfull](../../includes/sssdwfull-md.md)] or [!INCLUDE[ssPDW](../../includes/sspdw-md.md)], see [sys.dm_pdw_nodes_exec_sessions](sys-dm-pdw-exec-sessions-transact-sql.md). For serverless SQL pool use `sys.dm_exec_sessions`.
3336
3437
|Column name|Data type|Description and version-specific information|
3538
|-----------------|---------------|-----------------|
@@ -185,4 +188,3 @@ WHERE c.session_id = @@SPID;
185188

186189

187190

188-

docs/relational-databases/system-dynamic-management-views/sys-dm-pdw-exec-connections-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ monikerRange: ">= aps-pdw-2016 || = azure-sqldw-latest"
2020
Returns information about the connections established to this instance of [!INCLUDE[ssSDW](../../includes/sssdw-md.md)] and the details of each connection.
2121

2222
> [!NOTE]
23-
> [!INCLUDE[synapse-analytics-od-unsupported-syntax](../../includes/synapse-analytics-od-unsupported-syntax.md)]
23+
> [!INCLUDE[synapse-analytics-od-unsupported-syntax](../../includes/synapse-analytics-od-unsupported-syntax.md)] For serverless SQL pool use [sys.dm_exec_connections (Transact-SQL)](sys-dm-exec-connections-transact-sql.md).
2424
2525
|Column name|Data type|Description|
2626
|-----------------|---------------|-----------------|

docs/relational-databases/system-dynamic-management-views/sys-dm-pdw-exec-requests-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ monikerRange: ">= aps-pdw-2016 || = azure-sqldw-latest"
1818

1919
[!INCLUDE[applies-to-version/asa-pdw](../../includes/applies-to-version/asa-pdw.md)]
2020

21-
Holds information about all requests currently or recently active in [!INCLUDE[ssSDW](../../includes/sssdw-md.md)]. It lists one row per request/query.
21+
Holds information about all requests currently or recently active in [!INCLUDE[ssSDW](../../includes/sssdw-md.md)]. It lists one row per request/query.
2222

2323
> [!NOTE]
24-
> [!INCLUDE[synapse-analytics-od-unsupported-syntax](../../includes/synapse-analytics-od-unsupported-syntax.md)]
24+
> [!INCLUDE[synapse-analytics-od-unsupported-syntax](../../includes/synapse-analytics-od-unsupported-syntax.md)] For serverless SQL pool use [sys.dm_exec_requests (Transact-SQL)](sys-dm-exec-requests-transact-sql.md).
2525
2626
|Column Name|Data Type|Description|Range|
2727
|-----------------|---------------|-----------------|-----------|

docs/relational-databases/system-dynamic-management-views/sys-dm-pdw-exec-sessions-transact-sql.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ monikerRange: ">= aps-pdw-2016 || = azure-sqldw-latest"
2020
Holds information about all sessions currently or recently open on the appliance. It lists one row per session.
2121

2222
> [!NOTE]
23-
> [!INCLUDE[synapse-analytics-od-unsupported-syntax](../../includes/synapse-analytics-od-unsupported-syntax.md)]
23+
> [!INCLUDE[synapse-analytics-od-unsupported-syntax](../../includes/synapse-analytics-od-unsupported-syntax.md)] For serverless SQL pool use [sys.dm_exec_sessions (Transact-SQL)](sys-dm-exec-sessions-transact-sql.md).
2424
2525
|Column Name|Data Type|Description|Range|
2626
|-----------------|---------------|-----------------|-----------|
27-
|session_id|**nvarchar(32)**|The id of the current query or the last query run (if the session is TERMINATED and the query was executing at time of termination). Key for this view.|Unique across all sessions in the system.|
27+
|session_id|**nvarchar(32)**| The ID of of the current query or the last query run (if the session is TERMINATED and the query was executing at time of termination). Key for this view.|Unique across all sessions in the system.|
2828
|status|**nvarchar(10)**|For current sessions, identifies whether the session is currently active or idle. For past sessions, the session status may show closed or killed (if the session was forcibly closed).|'ACTIVE', 'CLOSED', 'IDLE', 'TERMINATED'|
29-
|request_id|**nvarchar(32)**|The id of the current query or last query run.|Unique across all requests in the system. Null if none has been run.|
29+
|request_id|**nvarchar(32)**|The ID of the current query or last query run.|Unique across all requests in the system. Null if none has been run.|
3030
|security_id|**varbinary(85)**|Security ID of the principal running the session.||
3131
|login_name|**nvarchar(128)**|The login name of the principal running the session.|Any string conforming to the user naming conventions.|
3232
|login_time|**datetime**|Date and time at which the user logged in and this session was created.|Valid **datetime** before current time.|
3333
|query_count|**int**|Captures the number of queries/requeststhis session has run since creation.|Greater than or equal to 0.|
3434
|is_transactional|**bit**|Captures whether a session is currently within a transaction or not.|0 for auto-commit, 1 for transactional.|
3535
|client_id|**nvarchar(255)**|Captures client information for the session.|Any valid string.|
3636
|app_name|**nvarchar(255)**|Captures application name information optionally set as part of the connection process.|Any valid string.|
37-
|sql_spid|**int**|The id number of the SPID. Use the `session_id` this session. Use the `sql_spid` column to join to **sys.dm_pdw_nodes_exec_sessions**.<br /><br /> **\*\* Warning \*\*** This column contains closed SPIDs.||
37+
|sql_spid|**int**|The IDs column contains closed SPIDs.||
3838

3939
For information about the maximum rows retained by this view, see the Metadata section in the [Capacity limits](/azure/sql-data-warehouse/sql-data-warehouse-service-capacity-limits#metadata) topic.
4040

0 commit comments

Comments
 (0)