Configure DB Mail Profile in SQL Agent for Automated Alerts
In the recent times I have seen so many people asking the same question in MSDN forums on how do I activate database mail for the use of SQL server agent alerts system. So I am taking a chance to document it by using screen shots which can help others.
Normally what the newbies tending to do is, once they configured database mail they expect the SQL agent to use it for alerting purposes. To be clear on this part we should make sql server agent to use any one of the configured mail profiles of database mail system otherwise the agent is not going to use them
Step 1:
Configure SQL database mail system , my friend Sugesh has an article in the same site at and this explains the db mail configuration pretty much step by step so I am not covering that part.
Step2:
Right click SQL server agent and go to properties. Now select Alert system tab as shown in fig , where you can see the mail profile is disabled.

Step3:
Now enable the mail profile by ticking it and you get two options.
- Database mail
- SQL mail
Choose database mail as shown in figure

Step 4:
After the database mail is selected then we have to select one of the available database mail profile. I have shown LEKS as my mail profile and I have added that.

Then click OK
Step 5:
We are almost done now and the final and most important part now is to restart the SQL agent services from services.msc or SSMS or SQL configuration manager.
Tags: alerts, automated alert, mail profile, operator, sql agent
Trackback from your site.
Amit Bhatt
| #
Hi Deepak,
Thanks for such a nice article.
You missed one thing to add in code:
@article = ‘all’,
Hence the script will be like this:
EXEC sp_addsubscription
@publication = ‘mypublication’,
@article = ‘ALL’,
@subscriber = ‘Subscriberservername’,
@destination_db = ‘mydestinationdbname’,
@reserved=’Internal’
Error 18486 | Platformblog
| #
[...] SQL-Articles » Troubleshooting Login failed Error 18456This is one of the infamous error message (and number) that most of the DBAs …. 18486. Login failed for user ‘%.*ls’ because the account is currently locked out. [...]
Setting and Changing Collation – SQL Server 2008 « Blog
| #
[...] to sql-articles.comRead more: http://sql-articles.com/articles/dba/how-to-change-server-collation-in-sql-server-2008/#ixzz1pu2S8XW… Like this:LikeBe the first to like this [...]
VidhyaSagar
| #
Naveen,
I’ll check this out and get back to you.
balakiran
| #
Thanks man, Very simple & easy to understand !!!!