Skip to content

Latest commit

 

History

History
65 lines (52 loc) · 3.53 KB

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

File metadata and controls

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

sys.dm_xe_session_events (Transact-SQL)

[!INCLUDE SQL Server SQL Managed Instance]

Returns information about events for active server-scoped sessions. Events are discrete execution points. Predicates can be applied to events to stop them from firing if the event does not contain the required information.

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

Column name Data type Description
event_session_address varbinary(8) The memory address of the event session. Is not nullable.
event_name nvarchar(256) The name of the event that an action is bound to. Is not nullable.
event_package_guid uniqueidentifier The GUID for the package containing the event. Is not nullable.
event_predicate nvarchar(3072) An XML representation of the predicate tree that is applied to the event. Is nullable.
event_fire_count bigint The number of times the event has fired (was published) since the session was started. Is not nullable. Applies to [!INCLUDEsssql22-md] and later.
event_fire_average_time bigint The average time taken to publish the event, in microseconds. Is not nullable. Applies to [!INCLUDEsssql22-md] and later.
event_fire_min_time bigint The minimum time taken to publish the event, in microseconds. Is not nullable. Applies to [!INCLUDEsssql22-md] and later.
event_fire_max_time bigint The maximum time taken to publish the event, in microseconds. Is not nullable. Applies to [!INCLUDEsssql22-md] and later.

Note

The event_fire_count and event_fire_average_time columns are populated only when trace flag 9708 is enabled.

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_events.event_session_address sys.dm_xe_sessions.address Many-to-one
sys.dm_xe_session_events.event_package_guid,

sys.dm_xe_session_events.event_name
sys.dm_xe_objects.name,

sys.dm_xe_objects.package_guid
Many-to-one

Next steps

Learn more about related concepts in the following articles: