To check if an extended event session with a name exists I use the following statement:
SELECT 1 FROM sys.dm_xe_sessions WHERE name = 'exName'
This only returns 1 if the session is started.
How can I determine the inactive sessions also?
(SQL Server 2008)
thanks,
Robbert