Aldrich Blog

C# | BizTalk

SQL 2005 Configuring SQL Job to send email notification if it failed.

This are the simple steps to enable it.
1) Run SQL Server Surface Area Configuration - > Surface Area Configuration for features ->
    Select Database Mail - > Check Enable Database mail stored procedures.
2) Open SQL Management Studio - > Management - > Database mail - > Configure SMTP Settings.
3) Go to SQL Server Agent - > Operators - > Create New Operator
4) Go to SQL Job - > In the Notifications, Check email and select the Operator. You can either
select  the option to send notification if job fails / succeeds/ completed.
Lastly, don't forget to restart the SQL Agent.

Legacy Comments


Freelance DBA
2009-03-05
re: SQL 2005 Configuring SQL Job to send email notification if it failed.
BTW for sql server 2008 only first step is different (since sql server surface area configuration is goen in last version)

exec sp_configure 'show advanced options', 1
reconfigure
exec sp_configure 'Database Mail XPs', 1
reconfigure

Freelance DBA
2009-03-05
re: SQL 2005 Configuring SQL Job to send email notification if it failed.
BTW, does anybody know if it is possible to use exchange accounts for database mail?

RPaulo
2009-03-05
re: SQL 2005 Configuring SQL Job to send email notification if it failed.
Yes you could .. for my SMTP server settings I'm using domain account. domain\login