| title | Delete an Alert | |||||||
|---|---|---|---|---|---|---|---|---|
| description | Delete an Alert | |||||||
| ms.prod | sql | |||||||
| ms.prod_service | sql-tools | |||||||
| ms.technology | ssms | |||||||
| ms.topic | conceptual | |||||||
| helpviewer_keywords |
|
|||||||
| author | markingmyname | |||||||
| ms.author | maghan | |||||||
| ms.reviewer | ||||||||
| ms.custom | seo-lt-2019 | |||||||
| ms.date | 02/04/2021 | |||||||
| monikerRange | = azuresqldb-mi-current || >= sql-server-2016 |
[!INCLUDE SQL Server SQL MI]
Important
On Azure SQL Managed Instance, most, but not all SQL Server Agent features are currently supported. See Azure SQL Managed Instance T-SQL differences from SQL Server for details.
This article describes how to delete Microsoft SQL Server Agent alerts using SQL Server Management Studio or Transact-SQL.
Removing an alert also removes any notifications associated with the alert.
By default, only members of the sysadmin fixed server role can delete alerts.
-
In Object Explorer, select the plus sign to expand the server that contains the SQL Server Agent alert that you want to delete.
-
Select the plus sign to expand SQL Server Agent.
-
Select the plus sign to expand the Alerts folder.
-
Right-click the alert you want to delete and select Delete.
-
In the Delete Object dialog box, confirm you chose the correct alert then select OK.
-
In Object Explorer, connect to an instance of [!INCLUDEssDE].
-
On the Standard bar, select New Query.
-
Copy and paste the following example into the query window and select Execute.
-- deletes the SQL Server Agent alert called 'Test Alert.' USE msdb ; GO EXEC dbo.sp_delete_alert @name = N'Test Alert' ; GO
For more information, see sp_delete_alert (Transact-SQL).