sp_update_notification
Updates the notification method of an alert notification.
Syntax
sp_update_notification [@alert_name =] 'alert',
[@operator_name =] 'operator',
[@notification_method =] notification
Arguments
[@alert_name =] 'alert'
Is the name of the alert associated with this notification. alert is sysname, with no default.
[@operator_name =] 'operator'
Is the operator who will be notified when the alert occurs. operator is sysname, with no default.
[@notification_method =] notification
Is the method by which the operator is notified. notification is tinyint, with no default, and can be one or more of these values.
Value | Description |
---|---|
1 | |
2 | Pager |
4 | net send |
7 | All methods |
Return Code Values
0 (success) or 1 (failure)
Remarks
sp_update_notification must be run from the msdb database.
You can update a notification for an operator who does not have the necessary address information using the specified notification_method. If a failure occurs when sending an e-mail message or pager notification, the failure is reported in the SQL Server Agent error log.
Permissions
Only members of the sysadmin fixed server role can execute sp_update_notification.
Examples
This example modifies the notification method for notifications sent to stevenb for the alert Test Alert.
USE msdb
EXEC sp_update_notification 'Test Alert', 'stevenb', 7