sp_delete_alert

Transact-SQL Reference

Transact-SQL Reference

sp_delete_alert

Removes an alert.

Syntax

sp_delete_alert [ @name = ] 'name'

Arguments

[@name =] 'name'

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

Return Code Values

0 (success) or 1 (failure)

Result Sets

None

Remarks

Removing an alert also removes any notifications associated with the alert.

sp_delete_alert must be executed in the msdb database.

Permissions

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

Examples

This example removes an alert named Test Alert.

sp_delete 'Test Alert'

See Also

sp_add_alert

sp_help_alert

System Stored Procedures