Επεξεργασία

Κοινή χρήση μέσω


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

Applies to: Azure SQL Database Azure SQL Managed Instance

Returns information about active database-scoped session targets. For information about targets for all database-scoped sessions, see sys.database_event_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 SQL managed instances. For more information, see CREATE EVENT SESSION.

Column name Data type Description
event_session_address varbinary(8) The memory address of the event session. Has a many-to-one relationship with sys.dm_xe_database_sessions.address. Isn't nullable.
target_name nvarchar(60) The name of the target within a session. Not nullable.
target_package_guid uniqueidentifier The GUID of the package that contains the target. Not nullable.
execution_count bigint The number of times the target has been executed for the session. Not nullable.
execution_duration_ms bigint The total amount of time, in milliseconds, that the target has been executing. Not nullable.
target_data nvarchar(max) The data that the target maintains, such as event aggregation information. Nullable.
bytes_written bigint Number of bytes written to target. Not nullable.
failed_buffer_count bigint Number of buffers that have failed to be processed by the target. This value is target-specific, and is different from dropped_buffer_count in sys.dm_xe_database_sessions. If a target fails to process a buffer, another target of the same session may independently process the same buffer successfully.

Permissions

Requires the VIEW DATABASE STATE permission.

Relationship cardinalities

From To Relationship
sys.dm_xe_database_session_targets.event_session_address sys.dm_xe_database_sessions.address Many-to-one

Next steps