Delen via


How to: Create a WMI Event Alert (SQL Server Management Studio)

This topic describes how to create a SQL Server Agent alert that is raised when a specific SQL Server event occurs that is monitored by the WMI Provider for Server Events. For information about the using the WMI Provider to monitor SQL Server events, see WMI Provider for Server Events Concepts. For information about the permissions necessary to receive WMI event alert notifications, see Selecting an Account for the SQL Server Agent Service.

To create a WMI event alert

  1. In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.

  2. Expand SQL Server Agent.

  3. Right-click Alerts and then click New Alert.

  4. In the Name box, enter a name for this alert.

  5. Select Enable to enable the alert to run. Enable is checked by default.

  6. In the Type box, click WMI event alert.

  7. In the Namespace box, specify the WMI namespace for the WMI Query Language (WQL) statement that identifies which WMI event will trigger this alert. Only namespaces on the computer that runs SQL Server Agent are supported.

  8. In the Query box, specify the WQL statement that identifies the event that this alert responds to. For more information about WQL, see Using WQL with the WMI Provider for Server Events.