Megosztás a következőn keresztül:


How to: Create an Alert Using Severity Level (SQL Server Management Studio)

This topic describes how to create a Microsoft SQL Server Agent alert that is raised when an event of a specific severity level occurs.

To create an alert using severity level

  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 select New Alert.

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

  5. In the Type box, click SQL Server event alert.

  6. Check the Enable check box to enable the alert to run. By default, Enable is checked.

  7. In the Database name list, click the database to restrict the alert to a specific database.

  8. Click Severity, and then click a severity level.

  9. Severity levels from 19 through 25 send a SQL Server message to the Microsoft Windows application log and trigger an alert. Events with severity levels less than 19 will trigger alerts only if you have used sp_altermessage, RAISERROR WITH LOG, or xp_logevent to force them to be written to the Windows application log.

  10. Check Raise alert when message contains box, and type a keyword or character string in the Message text box to restrict the alert to a particular character sequence. The maximum number of characters is 100.