Adrian Chiritescu
Adrian Chiritescu

Reputation: 285

How to get all SQL extended event sessions on server?

I want to query on the server for all extended event sessions, with state : started and stopped.

This query is returning only the sessions with state = started :

select [Name], create_time from sys.dm_xe_sessions

Can you please provide a way (if possible) which returns all the extended event sessions on the server ?

Upvotes: 3

Views: 3857

Answers (1)

Andrey Nikolov
Andrey Nikolov

Reputation: 13440

You should look in sys.server_event_sessions table:

select * from sys.server_event_sessions

sys.dm_xe_sessions returns information about an active extended events session only.

Upvotes: 3

Related Questions