Skip to content

Latest commit

 

History

History
74 lines (48 loc) · 4.21 KB

File metadata and controls

74 lines (48 loc) · 4.21 KB
description Configure SQL Server Agent mail to use Database Mail
title Configure SQL Server Agent mail to use Database Mail
ms.date 04/19/2022
ms.service sql
ms.reviewer
ms.subservice
ms.topic conceptual
helpviewer_keywords
Database Mail [SQL Server], SQL Server Agent Mail
SQL Server Agent Mail
author WilliamDAssafMSFT
ms.author wiassaf
ms.custom seo-dt-2019

Configure SQL Server Agent mail to use Database Mail

[!INCLUDE SQL Server]

This article describes how to configure [!INCLUDEssNoVersion] Agent to use Database Mail to send notification and alerts in [!INCLUDEssnoversion] by using [!INCLUDEssManStudioFull].

Prerequisites

Security

Permissions

The user creating the profiles accounts and executing stored procedures should be a member of the sysadmin fixed server role.

Using SQL Server Management Studio

The following steps are not necessary in [!INCLUDEssazuremi_md], which is already configured to look for a profile called AzureManagedInstance_dbmail_profile. For more information and a sample script, see Azure SQL Managed Instance SQL Agent job notifications.

To configure SQL Server Agent to use Database Mail in SQL Server

  • In Object Explorer, expand a [!INCLUDEssNoVersion] instance.

  • Right-click SQL Server Agent, and then select Properties.

  • Select Alert System.

  • Select Enable Mail Profile.

  • In the Mail system list, select Database Mail.

  • In the Mail profile list, select a mail profile for Database Mail.

  • Restart SQL Server Agent.

Follow-up Tasks

The following tasks are necessary to complete the configuration of Agent to send alerts and notifications.

  • Alerts

    Alerts can be configured to notify an operator of a particular database event or operating system condition.

  • Operators

    Operators are aliases for people or groups that can receive electronic notification

Next steps