Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 1.5 KB

File metadata and controls

72 lines (50 loc) · 1.5 KB
title sp_delete_alert (Transact-SQL)
description sp_delete_alert removes an alert.
author markingmyname
ms.author maghan
ms.reviewer randolphwest
ms.date 06/23/2025
ms.service sql
ms.subservice system-objects
ms.topic reference
f1_keywords
sp_delete_alert_TSQL
sp_delete_alert
helpviewer_keywords
sp_delete_alert
dev_langs
TSQL

sp_delete_alert (Transact-SQL)

[!INCLUDE SQL Server]

Removes an alert.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sp_delete_alert [ @name = ] N'name'
[ ; ]

Arguments

[ @name = ] N'name'

The name of the alert. @name is sysname, with no default.

Return code values

0 (success) or 1 (failure).

Result set

None.

Remarks

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

Permissions

[!INCLUDE msdb-execute-permissions]

Examples

The following example removes an alert named Test Alert.

USE msdb;
GO

EXECUTE dbo.sp_delete_alert @name = N'Test Alert';
GO

Related content