Managing Messages

While managing alerts, you can:

    To select a message to set an alert on
  1. While creating or editing an alert, under Alert Definition, select the Error Number option, and then choose the browse button.

    For information about creating alerts, see Creating an Alert, earlier in this chapter.

    The SQL Server Messages dialog box appears.

  2. To view all available messages, leave the default settings as is, and choose the Find button.

    A list of all messages appears.

  3. To view a subset of all available messages, change the defaults, and then choose the Find button.

    These options control the messages that will be searched for:

    Message Text Contains
    Searches for all messages that contain the text that is entered in this box.
    Severity
    Searches for messages of the selected severity level.
    Error Number
    Searches for a message having the error number entered in this box.
    Logged Messages Only
    Restricts the list to only those SQL Server messages that are always written to the Windows NT application log.

    If the System Messages option is selected, this list includes all system messages with severity levels 19 through 25, plus all user defined messages that are configured to be written to the log. If the System Messages option is cleared, this list includes only user-defined messages that are configured to always be written to the log.

    System Messages
    Lists system and user-defined messages. If this option is deselected, only user-defined messages are displayed.
  4. To sort the list by a column attribute, click on that column (Error, Severity, Language, Logged, or Message Text).

    This option is not available if the list contains more than 750 rows. The default sort is by error number.

  5. Select a message from the list, and then choose the Select button.

    The New Alert or Edit Alert dialog box returns. The number of the selected message is entered in the Error Number box.

You can edit the message list to create, modify, and delete user-defined messages. For user-defined messages, and for system messages with a severity level of 18 or less, you can choose an option to always write the message to the Windows NT application log.

The message list can be accessed from the New Alert or Edit Alert dialog box, as described in the previous procedure, or from the Manage Messages button of the Manage Alerts window, as described in the following procedure.

    To edit the message list
  1. From the Manage Alerts window, choose the Manage Messages button.

    The Manage SQL Server Messages dialog box appears.

  2. To create a user defined message, choose the New button, and complete the New Message dialog box that appears.

    Error number assignments for user defined messages begin at 50001.

  3. To Edit a message, define the message search criteria, choose the Find button, select the message from the list, and complete the Edit Message dialog box that appears.

    For user-defined messages, all options except Error Number can be edited. For other messages, only the option Always Write To Windows NT Eventlog can be changed.

  4. To delete a message, select the message from the list, choose Delete, and then choose Yes in the confirmation dialog box that appears.

    Only user-defined messages can be deleted.

  5. When you finish editing messages, choose Close.

Messages can also be managed by the SA beginning from the SQL Enterprise Manager window, without needing to open the Manage Alerts window.

    To manage messages, beginning from the SQL Enterprise Manager window