Edit

Share via


sys.database_event_session_targets

Applies to: SQL Server 2016 (13.x) and later versions Azure SQL Database Azure SQL Managed Instance SQL database in Microsoft Fabric Preview

The sys.database_event_session_targets dynamic management view (DMV) returns a row for each event target for a database-scoped event session. For information about active database-scoped sessions, see sys.dm_xe_database_session_targets.

Column name Data type Description
event_session_id int The ID of the event session. Is not nullable.
target_id int The ID of the target. ID is unique within the event session object. Is not nullable.
name sysname The name of the event target. Is not nullable.
package sysname The name of the event package that contains the event target. Is not nullable.
module sysname The name of the module that contains the event target. Is not nullable.

Permissions

Requires the VIEW DATABASE STATE permission.

Remarks

This view has the following relationship cardinalities.

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