sp_delete_notification

Transact-SQL Reference

Transact-SQL Reference

sp_delete_notification

Removes all notifications sent to a particular operator in response to an alert.

Syntax

sp_delete_notification [ @alert_name = ] 'alert' ,
    [ @operator_name = ] 'operator'

Arguments

[@alert_name =] 'alert'

Is the name of the alert. alert is sysname, with no default.

[@operator_name =] 'operator'

Is the name of the operator. operator is sysname, with no default.

Return Code Values

0 (success) or 1 (failure)

Result Sets

None

Remarks

Removing a notification removes only the notification; the alert and the operator are left intact.

Permissions

Only members of the sysadmin fixed server role can execute sp_delete_notification.

Examples

This example removes all notifications sent to operator stevenb when alert 'Error 1101' occurs.

USE msdb
EXEC sp_delete_notification 'Error 11001', 'stevenb'

See Also

sp_add_alert

sp_add_notification

sp_add_operator

sp_delete_alert

sp_help_alert

sp_help_notification

sp_help_operator

sp_update_notification

System Stored Procedures