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.
|Applies to: SQL Server (SQL Server 2012 through current version).|
|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.|
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 SQL Server Audit for auditing. SQL Server Audit uses Extended Events to help create an audit. For more information, see SQL Server Audit (Database Engine).