SQL Server Agent Log and SQL Server Error Log metrics allow users to trigger an alert based on certain text or regular expressions. SQL Diagnostic Manager provides different levels of alerts so you can select whether you want to generate a critical, warning, or informational alert based on your entered data. You can also limit the size of your logs to decrease your response time and avoid using additional space on your server.

To use ad hoc Alert Configuration to enter text or a regular expression to trigger an alert:

  1. In the Navigation page, click Servers.
  2. Right-click the appropriate SQL server instance, and then select Configure Alerts.
  3. Select the metric for which you want to configure an alert.
  4. Click Advanced.
  5. If you want to trigger an alert for certain text, type the text in the appropriate field. Use semicolons to separate names and a percent (%) character as a wildcard.
  6. If you want to trigger an alert for a certain regular expression, type the expression in the appropriate field. Type only one regular expression per line.
  7. Click OK.
  8. To accept these changes, click OK.

To use Alert Configuration Templates to enter text or a regular expression to trigger an alert:

  1. Click Tools > Alert Configuration Templates.
  2. Click New or select an existing template, and then click View/Edit.
  3. If you clicked New, type a name, and then click Edit Configuration.
  4. If you clicked View/Edit, click Edit Configuration.
  5. Select the metric for which you want to configure an alert.
  6. Click Advanced.
  7. If you want to trigger an alert for certain text, type the text in the appropriate field. Use semicolons to separate names and a percent (%) character as a wildcard.
  8. If you want to trigger an alert for a certain regular expression, type the expression in the appropriate field. Type only one regular expression per line.
  9. Click OK.
  10. If you want SQL Diagnostic Manager to replicate your edits to every monitored SQL Server instance, click Yes.
  11. To accept these changes, click OK.

Limit the size of a log that SQL Diagnostic Manager reads

In an attempt to improve response time and avoid using unnecessary space on your server, you can designate the maximum size of your SQL Server Agent log and your SQL Server Error log that SQL Diagnostic Manager reads. When a log reaches the size limit set in the Alert Configuration, it triggers an alert. SQL Diagnostic Manager does not display in the Logs view any data from error or agent logs in excess of the size limit. A quick solution to decrease the size of your file is to click Cycle Server Log to archive the information in the most recent log and start a new log. You can also cycle the log using SSMS.

Before cycling your log, it is important to note that if you have a limit set, then the log file deleted is the oldest log file stored. If you want to keep that log file, copy the file elsewhere before cycling the log.

SQL Server 2000 users also must restart the SQL Server Agent Service after cycling the SQL Server Agent log. The only way to cycle the agent log on SQL Server is to cycle the agent service. This process results in a new log.

To adjust the log size limit that SQL Diagnostic Manager reads:

  1. View the Alert Configuration for your monitored SQL Server instance.
  2. Select either the SQL Server Agent Log or the SQL Server Error Log alert, and then click Advanced.
  3. In the Alert Filters tab, adjust the Size (MB) field based on what you want for your log size limit.
  4. Click OK, and then click Apply.
  5. Click OK in the confirmation message if you want to apply your change to any other SQL Server instances, or click No.


SQL Diagnostic Manager identifies and resolves SQL Server performance problems before they happen. Learn more > >