Events
Mar 31, 11 PM - Apr 2, 11 PM
The ultimate SQL, Power BI, Fabric, and AI community-led event. March 31 - April 2. Use code MSCUST for a $150 discount. Prices go up Feb 11th.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to: SQL Server
This article describes how to configure SQL Server Agent to use Database Mail to send notification and alerts in SQL Server by using SQL Server Management Studio.
AzureManagedInstance_dbmail_profile
. For more information and a sample script, see Azure SQL Managed Instance SQL Agent job notifications.Create a Database Mail account for the SQL Server Agent service account to use.
Create a Database Mail profile for the SQL Server Agent service account to use and add the user to the DatabaseMailUserRole database role in the msdb
database. For instructions, see Are users properly configured to send mail.
Set the profile as the default profile for the msdb
database.
The user creating the profiles accounts and executing stored procedures should be a member of the sysadmin fixed server role.
The following steps aren't necessary in Azure SQL Managed Instance, 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 SQL Server 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.
The following tasks are necessary to complete the configuration of Agent to send alerts and notifications.
Alerts can be configured to notify an operator of a particular database event or operating system condition.
Operators are aliases for people or groups that can receive electronic notification
Events
Mar 31, 11 PM - Apr 2, 11 PM
The ultimate SQL, Power BI, Fabric, and AI community-led event. March 31 - April 2. Use code MSCUST for a $150 discount. Prices go up Feb 11th.
Register today