sp_delete_notification (Transact-SQL)
Removes a SQL Server Agent notification definition for a specific alert and operator.
Syntax
sp_delete_notification
[ @alert_name = ] 'alert' ,
[ @operator_name = ] 'operator'
Arguments
- [ @alert_name= ] 'alert'
The name of the alert. alert is sysname, with no default.
- [ @operator_name= ] 'operator'
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
To run this stored procedure, users must be granted the sysadmin fixed server role.
Examples
The following example removes the notification sent to operator François Ajenstat
when alert Test Alert
occurs.
USE msdb ;
GO
EXEC dbo.sp_delete_notification
@alert_name = 'Test Alert',
@operator_name = 'François Ajenstat' ;
GO
See Also
Reference
sp_add_alert (Transact-SQL)
sp_add_notification (Transact-SQL)
sp_add_operator (Transact-SQL)
sp_delete_alert (Transact-SQL)
sp_help_alert (Transact-SQL)
sp_help_notification (Transact-SQL)
sp_help_operator (Transact-SQL)
sp_update_notification (Transact-SQL)
System Stored Procedures (Transact-SQL)