The SQL - Long Running SQL alarm is raised when SQL has been running longer than a configured time. Because the (configured time) is unique to each environment, the SQL - Long Running SQL alarm, by default, is not configured.
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 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
Click Configure | Alarms.
To apply the alarm configuration to a connection, select the connection from the drop down list. The templates you have created are also selectable from the drop down list. Select a template to modify. Note that the Spotlight Factory Settings Template cannot be modified. To create a template, select an existing template or connection from the list to form the basis of the new template and click Save as Template.
Click Add Severity and select a severity.
Scenario: Click Add Severity and select Medium.
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.