Custom SQL Server Alerts Tool - Mini DBA


Legacy Documentation

Desktop And Mini DBA Server

Legacy Documentation Home alerts analysisservicesalerts analysisservicescpu analysisservicesdashboard analysisservicesdatabases analysisservicesio analysisservicessessions azurealerts azuredatabase azuredatabasehealthcheck azureindexes azurelocks azure security azuresessions azuresql azuresqldatabase azuresqldatabasedashboard azuresqldatabases azure sql server dashboard azuretables azurewaits compare performance baseline connections cpu custom sql server alerts database database query performance databases defaulttrace dm exec query statistics xml documentation errorlog files gettingstarted healthcheck database healthcheck sql server history active history blocking history data storage history deadlocks history files history memory history viewer history waits howtoperformancetuneazuresqldatabase how to performance tune sql server how to sql server performance tuning how to sql server query tuning indexes Installation io License Support locks maintenance windows options performance history security server servergettingstarted Server Installation server memory serveroptions serversecurity servertroubleshooting sql database memory sql execution plan sql extended event sessions sql server activity sql server alert configuration sql server alerts sql server database sql server execution plan view sql server index defrag jobs sqlserverindexfragmentation sql server index fragmentation sql server index maintenance sql server live query statistics sqlserverqueryperformance sql server query performance sql server send slack alerts sql server send teams alerts sql server transaction log sql server wait statistics tables tranlog waits webmonitorconfigure webmonitorconnections webmonitorcurrent webmonitorcustom webmonitorenterprise webmonitorgettingstarted webmonitorhistoric webmonitorinstallation webmonitorio webmonitormemory webmonitoroptions webmonitoroverview webmonitorsecurity webmonitorwaits wmi
You can create an unlimited number of custom SQL alerts based on your own T-SQL queries. This allows you to monitor custom application data such as number of active work items or queue lengths and be alerted when the results fall outside your chosen thresholds.
As with other alert types you can choose if you want to be alerted through application popups, email, Slack etc.
The screenshot belows shows the alerts configuration screen.
SQL Server triggers
After giving you alert a name and description you must decide whether the alert query will return a boolean or numberic result. If a boolean then the alert will be raised if the result is true. If numberic then the threshold property is used as well.
You can set the query timeout in seconds and then test your query. When saved it will appear in the master list of alerts under the Custom section as seen below.
SQL Server triggers
On the alert properties area you can now give the alert numeric thresholds (if the query type was numeric not boolean). Also the standard options are email and Slack etc for both major and minor alert types.

The amount of custom alerts you create is up to you and means miniDBAs standard alerts can be added to and then easily copied across all servers in your environment.