Documentation forDatabase Performance Analyzer

Create a DPA alert to monitor SQL statement execution time

Use DPA alerts to send notifications about potential problems so that your team can take steps to resolve the issue before it affects end users.

A previous example showed how to use DPA to resolve performance problems that were caused by a long-running SQL statement. This example adds an alert to notify the DBA group if the average execution time of that SQL statement is above the specified threshold. If this alert is triggered, the team can stop the query before end users notice a performance problem.

For general information on how to create alerts in DPA, see Create a DPA Wait Time alert, Create a DPA Resources alert, Create a DPA Administrative alert, or Create a DPA Custom alert.

  1. On the DPA menu, click Alerts.
  2. Click the Manage Alerts tab.
  3. For the Alert Category, select Wait Time.
  4. For the Alert Type, select Average Wait Time for a Single SQL.

  5. Click Create Alert.
  6. Enter a unique name, select the execution interval, and enter the email notification text.

    SolarWinds recommends an execution interval of at least 10 minutes. This allows time for valid samples and prevents unnecessary alerts from a single slow execution.

  7. Select the database instance that the SQL statement runs against.

  8. Select the SQL statement the alert monitors.

    1. Click Search next to the SQL Hash field.

    2. Because this SQL statement has a name, leave Name and Hash selected as the SQL Search Type.

    3. Select the name of the SQL statement from the list.

    4. Click OK. The hash value of the SQL statement is displayed in the SQL Hash field.
  9. Specify the thresholds for each alert level you want to enable.

    In this example, a High alert is triggered if the average wait time of the SQL statement during an execution interval is 30 seconds or more.

  10. Select the person or group who gets notified when an alert level is triggered and when the alert is broken. (The alert status is set to Broken if an error occurs during execution.)

    If you have not added the person or group as a contact in DPA, click Add Contact or Add Contact Group. See Create contacts and contact groups in the DPA Administrator Guide.

  11. Click Test Alert to verify that no errors occur when the alert is executed.
  12. Click Save.