Skip to content

Latest commit

 

History

History
60 lines (48 loc) · 2.73 KB

sys-dm-xe-session-targets-transact-sql.md

File metadata and controls

60 lines (48 loc) · 2.73 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sys.dm_xe_session_targets (Transact-SQL)
sys.dm_xe_session_targets (Transact-SQL)
rwestMSFT
randolphwest
02/27/2023
sql
system-objects
reference
sys.dm_xe_session_targets
dm_xe_session_targets_TSQL
dm_xe_session_targets
sys.dm_xe_session_targets_TSQL
sys.dm_xe_session_targets dynamic management view
extended events [SQL Server], views
TSQL

sys.dm_xe_session_targets (Transact-SQL)

[!INCLUDE SQL Server SQL Managed Instance]

Returns information about active server-scoped session targets.

Azure SQL Database supports only database-scoped sessions. See sys.dm_xe_database_session_targets.

Column name Data type Description
event_session_address varbinary(8) The memory address of the event session. Has a many-to-one relationship with sys.dm_xe_sessions.address. Is not nullable.
target_name nvarchar(60) The name of the target within a session. Is not nullable.
target_package_guid uniqueidentifier The GUID of the package that contains the target. Is not nullable.
execution_count bigint The number of times the target has been executed for the session. Is not nullable.
execution_duration_ms bigint The total amount of time, in milliseconds, that the target has been executing. Is not nullable.
target_data nvarchar(max) The data that the target maintains, such as event aggregation information. Is nullable.
bytes_written bigint Applies to: SQL Server 2017 and later. Number of bytes written to target. Is not nullable.

Permissions

Requires VIEW SERVER STATE permission on the server.

Permissions for SQL Server 2022 and later

Requires VIEW SERVER PERFORMANCE STATE permission on the server.

Relationship cardinalities

From To Relationship
sys.dm_xe_session_targets.event_session_address sys.dm_xe_sessions.address Many-to-one

Next steps

Learn more about related concepts in the following articles: