Documentation forSQL Sentry

Enable Extended Events

SQL Trace and Extended Events

SQL Sentry XE Trace ensures that Top SQL uses the current SQL trace mechanism. It's also used to collect data while minimizing the overhead and effectively using Extended Events. 

Important:  There is a different process for enabling the SentryOne Extended Events Trace in the 18.4 upgrade.

Enable the SQL Sentry XE Trace in Versions 2021.8 and above

  1. In the Settings Pane, open SQL Server > Top SQL Source for your target.

  2. Set Trace Engine to Extended Events (XE).

  3. Click Save to save your settings.

Enable the SQL Sentry XE Trace in Versions 2020 through 2021.1.13

  1. Run the following query on the SQL Sentry database to replace SQL trace with extended events:
    --Disable old xe trace, if exists and enabled
    IF EXISTS
    (
    SELECT * FROM dbo.FeatureFlag
    WHERE [Name] = 'XeventsTrace' and [Enabled] = 1
    )
    UPDATE dbo.FeatureFlag
    SET [Enabled] = 0
    WHERE [Name] = 'XeventsTrace';
    --Enable RingBuffer XE trace
    IF NOT EXISTS
    (
    SELECT * FROM dbo.FeatureFlag
    WHERE [Name] = 'XEventsRingBuffer'
    )
    INSERT INTO dbo.FeatureFlag ([Name], [Enabled])
    VALUES ( 'XEventsRingBuffer', 1);
    SELECT * FROM dbo.FeatureFlag;
  2. Restart the monitoring service.

Enabling the SentryOne XE Trace in Versions 18.4 through 19.x

  1. To enable XEvents, add the following row to the [FeatureFlag] table:
    INSERT INTO [FeatureFlag] ([Name], [Enabled]) VALUES ('XEventsTrace', 1)
  2. Restart the monitoring service

Enabling the SentryOne XE Trace Pre 18.4

Locating the SentryOne Service Configuration File Pre 18.4

The SentryOne monitoring service application configuration file is located in the SentryOne installation directory on the servers hosting the SentryOne monitoring service. Use either of the following files for x64 or x86 SentryOne systems. 

  • C:\Program Files\SentryOne\18.0
  • C:\Program Files (x86)\SentryOne\18.0

 Edit the configuration file using an editor of your choice. 

Note:  Remember that to edit this file for all monitoring services, the editor needs to be run as an administrator.

Editing the SentryOne Service Configuration File

Add the following query to the appSettings section of the configuration file, and then select Save

<add key="xeventsTrace" value="true" />

Complete the previous procedure for all monitoring services that are running in the monitoring solution. The configuration files can be edited while the services are running. However, the monitoring services need to be restarted to pick up the configuration changes.

Verifying Setup

After the services restart, the following behaviors exhibit on the monitored targets:

  • SQL Server 2012 and higher uses Extended Events in place of SQL Trace.
  • SQL Server 2008R2 and lower remains using SQL Trace.
Additional Information: For more information about Extended Events and SQL XE Trace, see the Extended Events article.