Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Inactive Extended Event Sessions Expand / Collapse
Author
Message
Posted Monday, January 28, 2013 4:57 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, May 2, 2014 6:41 AM
Points: 1,287, Visits: 784
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



Post #1412349
Posted Tuesday, January 29, 2013 2:10 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, May 2, 2014 6:41 AM
Points: 1,287, Visits: 784
I asked the same question on twitter and got an instant reply from John Sansom (@SqlBrit)
The answer is: use sys.server_event_sessions, not sys.dm_xe_sessions.

Thanks John,

Robbert




Post #1412823
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse