Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Updates the notification method of an alert notification.
Transact-SQL syntax conventions
sp_update_notification
[ @alert_name = ] N'alert_name'
, [ @operator_name = ] N'operator_name'
, [ @notification_method = ] notification_method
[ ; ]
The name of the alert associated with this notification. @alert_name is sysname, with no default.
The operator who is notified when the alert occurs. @operator_name is sysname, with no default.
The method by which the operator is notified. @notification_method is tinyint, and can be one or more of these values.
Value | Description |
---|---|
1 |
|
2 |
Pager |
4 |
net send |
7 |
All methods |
0
(success) or 1
(failure).
sp_update_notification
must be run from the msdb
database.
You can update a notification for an operator who doesn't 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.
To run this stored procedure, users must be granted the sysadmin fixed server role.
The following example modifies the notification method for notifications sent to François Ajenstat
for the alert Test Alert
.
USE msdb;
GO
EXEC dbo.sp_update_notification
@alert_name = N'Test Alert',
@operator_name = N'François Ajenstat',
@notification_method = 7;
GO
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today