By creating alerts, you can set up SQL Enterprise Manager to respond automatically to SQL Server events, either by executing a task that you have defined or by sending an email and/or a pager message to an operator that you have specified.
Although it is not required, it is a good idea to create operators before you create alerts.
The Manage Alerts window appears, with the Alerts tab selected.
The New Alert dialog box appears.
The Enabled box is selected by default. In most cases, this is the appropriate setting. It is useful to clear this option if you want to create the alert now but do not want it to take effect until later.
To select from a list of error messages, or to create a custom error message, select Error Number, select the browse button, and complete the SQL Server Messages dialog box that appears. For more information, see Managing Messages, later in this chapter.
Note that an alert will occur only if the specified event is written to the Windows NT application log. For information about which events are logged, see Alerts Overview.
For a list of error numbers and a discussion of severity levels, see Part 8, Troubleshooting.
If an event occurs that matches both an alert set on a error number and an alert set on a severity, only the more specific alert (the error number alert) will run.
A task can invoke a program or a Transact-SQL statement (task types CmdExec or TSQL) and can only have an "On Demand" schedule. For information on creating tasks, see Chapter 16, Scheduling Tasks.
You can enter up to 255 characters. Note that this is any text you want to add to the alert. Do not type in the actual error message text.
For example, suppose you type 8 in this box. Later, five alerts that meet the alert definition occur within a period of eight seconds or less. Only one alert is sent to the operators specified in step 9.
A solid envelope or solid telephone icon indicates that the operator has address information of that type defined. An outline envelope or outline telephone icon indicates that the operator does not have address information of that type defined.
If you have not yet created the necessary operators, don't worry. You will be given the opportunity during operator creation to assign this alert to each operator. You can also later edit this alert after operators have been created.
The alert is created.