Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 3.03 KB

File metadata and controls

52 lines (40 loc) · 3.03 KB
title sys.database_event_session_targets
titleSuffix Azure SQL Database and Azure SQL Managed Instance
description sys.database_event_session_targets (Azure SQL Database and Azure SQL Managed Instance)
author rwestMSFT
ms.author randolphwest
ms.date 4/18/2022
ms.service sql
ms.subservice system-objects
ms.topic reference
dev_langs
TSQL
ms.assetid 38d775ee-1fe1-4820-88c6-02b2f875a66b
monikerRange =azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current

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

[!INCLUDE sqlserver2016-asdb]

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.

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.
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

Next steps

Learn more about related concepts in the following articles: