BizTalk 2013 cannot send BAM Email Alerts when using SQL 2012 Database Mail

If you configure BizTalk 2013 BAM Alerts service to run with a non-SQL admin user(not SysAdmin) with SQL 2012 DB Mail functionality to send alerts mails, you may notice the email alerts function does not work but file alerts are working well. Furthermore, all email alerts items are dropped into the table:



This behavior should be caused by the non-SysAdmin doesn't have proper permission to call sp_send_dbmail (Transact-SQL)


Accroding to the document, DatabaseMailUserRole role is required to call this stored procedure. Use the following SQL commands to grant the role to the BAM Alerts Service user and test if this resolves the problem.


use msdb


create user '%YourBAMAlertServiceAccount%'


exec sp_addrolemember 'DatabaseMailUserRole','%YourBAMAlertServiceAccount%'




Best regards,

WenJun Zhang