Skip to content

Latest commit

 

History

History
91 lines (62 loc) · 3.31 KB

File metadata and controls

91 lines (62 loc) · 3.31 KB
title Delete an Alert | Microsoft Docs
ms.custom
ms.date 01/19/2017
ms.prod sql
ms.prod_service sql-tools
ms.reviewer
ms.technology ssms
ms.topic conceptual
helpviewer_keywords
SQL Server Agent, alerts
alerts [SQL Server], deleting
deleting alerts
canceling alerts
dropping alerts
disabling alerts
removing alerts
ms.assetid c982b208-e2d1-4d34-8cee-940b9baf6586
author stevestein
ms.author sstein
manager craigg
monikerRange = azuresqldb-mi-current || >= sql-server-2016 || = sqlallproducts-allversions

Delete an Alert

[!INCLUDEappliesto-ss-asdbmi-xxxx-xxx-md]

Important

On Azure SQL Database Managed Instance, most, but not all SQL Server Agent features are currently supported. See Azure SQL Database Managed Instance T-SQL differences from SQL Server for details.

This topic describes how to delete [!INCLUDEmsCoName] [!INCLUDEssNoVersion] Agent alerts in [!INCLUDEssCurrent] by using [!INCLUDEssManStudioFull] or [!INCLUDEtsql].

In This Topic

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, click the plus sign to expand the server that contains the SQL Server Agent alert that you want to delete.

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

  3. Click 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 that the correct alert is selected and click OK.

Using Transact-SQL

To delete an alert

  1. In Object Explorer, connect to an instance of [!INCLUDEssDE].

  2. On the Standard bar, click New Query.

  3. Copy and paste the following example into the query window and click 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).