Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 2.95 KB

disable-or-reactivate-an-alert.md

File metadata and controls

71 lines (52 loc) · 2.95 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords monikerRange
Disable or Reactivate an Alert
Disable or Reactivate an Alert
markingmyname
maghan
01/19/2017
sql
ssms
how-to
SQL Server Agent, alerts
alerts [SQL Server], reactivating
deleting alerts
canceling alerts
dropping alerts
disabling alerts
alerts [SQL Server], disabling
reactivating alerts
removing alerts
= azuresqldb-mi-current || >= sql-server-2016

Disable or Reactivate an Alert

[!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 topic describes how to disable or reactivate a [!INCLUDEmsCoName] [!INCLUDEssNoVersion] Agent alert in [!INCLUDEssnoversion] by using SQL Server Management Studio or [!INCLUDEtsql].

Before You Begin

Security

Permissions

By default, members of the sysadmin fixed server role can edit information in an alert. Other users must be granted the SQLAgentOperatorRole fixed database role in the msdb database.

Using SQL Server Management Studio

To disable or reactivate an alert

  1. In Object Explorer, click the plus sign to expand server that contains the alert you wish to disable or reactivate.

  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 wish to enable and select Enable To disable an alert, right-click the alert you want to disable and select Disable.

  5. The Disable Alert or Enable Alert dialog box displays showing the status of the process. When finished, click Close.

Using Transact-SQL

To disable or reactivate 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.

    -- changes the enabled setting of Test Alert to 0  
    USE msdb ;  
    GO  
    
    EXEC dbo.sp_update_alert  
        @name = N'Test Alert',  
        @enabled = 0 ;  
    GO  
    

For more information, see sp_update_alert (Transact-SQL).