Редагувати

Поділитися через


sys.database_event_session_events (Azure SQL Database and Azure SQL Managed Instance)

Applies to: SQL Server 2016 (13.x) and later Azure SQL Database Azure SQL Managed Instance

Returns a row for each event in a database-scoped event session. For information on events in active database-scoped sessions, see sys.dm_xe_database_session_events.

Azure SQL Database supports only database-scoped sessions. Azure SQL Managed Instance supports both database-scoped sessions and server-scoped sessions. Server-scoped sessions are recommended for managed instances: learn more in CREATE EVENT SESSION.

Column name Data type Description
event_session_id int The ID of the event session. Is not nullable.
event_id int The ID of the event. This ID is unique within an event session object. Is not nullable.
name sysname The name of the event. Is not nullable.
package sysname The name of the event package that contains the event. Is not nullable.
module sysname The name of the module that contains the event. Is not nullable.
predicate nvarchar(3000) The predicate expression that is applied to the event. Is nullable.
predicate_xml nvarchar(3000) The XML predicate expression that is applied to the event. Is nullable.

Permissions

Requires the VIEW DATABASE STATE permission.

Remarks

This view has the following relationship cardinalities.

From To Relationship
sys.database_event_session_events.event_session_id sys.database_event_sessions.event_session_id Many to one

Next steps

Learn more about related concepts in the following articles: