Delete an Alert

Applies to: SQL Server Azure SQL Managed Instance

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.

Before you begin

Limitations and restrictions

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

Security

Permissions

By default, only members of the sysadmin fixed server role can delete alerts.

Using SQL Server Management Studio

To delete an alert

  1. In Object Explorer, select the plus sign to expand the server that contains the SQL Server Agent alert that you want to delete.

  2. Select the plus sign to expand SQL Server Agent.

  3. Select the plus sign to expand the Alerts folder.

  4. Right-click the alert you want to delete and select Delete.

  5. In the Delete Object dialog box, confirm you chose the correct alert then select OK.

Using Transact-SQL

To delete an alert

  1. In Object Explorer, connect to an instance of Database Engine.

  2. On the Standard bar, select New Query.

  3. 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).