sp_delete_alert (Transact-SQL)
Applies to: SQL Server
Removes an alert.
Transact-SQL syntax conventions
Syntax
sp_delete_alert [ @name = ] N'name'
[ ; ]
Arguments
[ @name = ] N'name'
The name of the alert. @name is sysname, with no default.
Return code values
0
(success) or 1
(failure).
Result set
None.
Remarks
Removing an alert also removes any notifications associated with the alert.
Permissions
You can grant EXECUTE
permissions on this procedure, but these permissions might be overridden during a SQL Server upgrade.
Examples
The following example removes an alert named Test Alert
.
USE msdb;
GO
EXEC dbo.sp_delete_alert
@name = N'Test Alert';
GO