title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sp_delete_alert (Transact-SQL) |
sp_delete_alert removes an alert. |
markingmyname |
maghan |
randolphwest |
01/23/2024 |
sql |
system-objects |
reference |
|
|
|
[!INCLUDE SQL Server]
Removes an alert.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_delete_alert [ @name = ] N'name'
[ ; ]
The name of the alert. @name is sysname, with no default.
0
(success) or 1
(failure).
None.
Removing an alert also removes any notifications associated with the alert.
[!INCLUDE msdb-execute-permissions]
The following example removes an alert named Test Alert
.
USE msdb;
GO
EXEC dbo.sp_delete_alert
@name = N'Test Alert';
GO