Today, I am going to talk about setting up performance alerts so that you can notified when a server has issues. Basically, there are two types of performance alerts, SQL Server and WMI. I am going to use the sp_add_category system procedure to define a peformance category.
1 2 3 4 5 6 7 8 9 10 |
-- Add a custom category for alerts EXEC msdb.dbo.sp_add_category @class=N'ALERT', @type=N'NONE', @name=N'[Alert By Performance]' ; GO -- Show Alert categoryes EXEC msdb.dbo.sp_help_category @class=N'ALERT' GO |
The sp_add_alert stored procedure is used to create the alert and the sp_add_notification stored procedure is used to associate the alert with an operator. This process is used below to show examples of both SQL and WMI performance alerts. The first type…