You work in an OLTP environment and often get complaints about delays in server processing. You want to be notified when SQL on a particular server is running longer than expected so you can investigate what is causing the delay. You configure Spotlight Enterprise to raise a medium severity alarm when it detects SQL running for longer than five minutes. When the SQL - Long Running SQL alarm is raised, you use the Sessions page to view the long running SQL.
When the alarm is raised
Open the SQL Server | SQL Activity Drilldown | Sessions page. View the long running SQL.
In Spotlight Enterprise, from a Spotlight Client:
- Click Configure | Alarms.
- To apply the alarm configuration to a connection, select the connection from the drop down list.
- Locate the alarm SQL - Long Running SQL. Double click on the alarm to configure the settings.
- Clear the Factory Settings control for the SQL - Long Running SQL alarm and so you can modify the settings for this alarm.
Click Add Severity and select a severity.
Scenario: Click Add Severity and select Medium.
- Select the check box of the new severity.
- Copy and paste the text in the Description cell from the Normal severity to the new severity.
- In the Start cell, type the duration in seconds, of how long the SQL should run for before the alarm is raised.
Scenario: In the Start cell, type 300 .Tip: You can also configure alarm severities using keys. In the SQL - Long Running SQL alarm, the key is the SPID.
- Click OK to close the dialog for the SQL - Long Running SQL alarm.
- From the dialog to Configure Alarms, you can continue to configure more alarms for the selected connection (or template). When you have finished you may choose to apply the configuration(s) to other connections or save the configuration(s) to a template.
- Click OK to save the alarm configuration(s) for the selected connection (or template).