Skip to content

Latest commit

 

History

History
56 lines (46 loc) · 2.39 KB

extended-events-tables-trace-xe-event-map.md

File metadata and controls

56 lines (46 loc) · 2.39 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
trace_xe_event_map (Transact-SQL)
Extended Events Tables - trace_xe_event_map
VanMSFT
vanto
03/14/2017
sql
system-objects
reference
trace_xe_event_map_TSQL
trace_xe_event_map
trace_xe_event_map
extended events [SQL Server], tables
TSQL

Extended Events Tables - trace_xe_event_map

[!INCLUDE SQL Server]

Contains one row for each Extended Events event that is mapped to a SQL Trace event class. This table is stored in the master database, in the sys schema.

Column name Data type Description
trace_event_id smallint The ID of the SQL Trace event class that is being mapped.
package_name nvarchar(60) The name of the Extended Events package where the mapped event resides.
xe_event_name nvarchar(60) The name of the Extended Events event that is mapped to the SQL Trace event class.

Remarks

You can use the following query to identify the Extended Events events that are equivalent to the SQL Trace event classes:

SELECT te.name, xe.package_name, xe.xe_event_name  
FROM sys.trace_events AS te  
LEFT JOIN sys.trace_xe_event_map AS xe  
   ON te.trace_event_id = xe.trace_event_id  
WHERE xe.trace_event_id IS NOT NULL  

Not all event classes have equivalent Extended Events events. You can use the following query to list the event classes that do not have an Extended Events equivalent:

SELECT te.trace_event_id, te.name  
FROM sys.trace_events AS te  
LEFT JOIN sys.trace_xe_event_map AS xe  
   ON te.trace_event_id = xe.trace_event_id  
WHERE xe.trace_event_id IS NULL  

In the previous query, most of the returned event classes are audit-related. We recommend that you use [!INCLUDEssNoVersion] Audit for auditing. [!INCLUDEssNoVersion] Audit uses Extended Events to help create an audit. For more information, see SQL Server Audit (Database Engine).

See Also

trace_xe_action_map (Transact-SQL)