info@techdevops.com | 437-991-3573 | Data Engineering Services
TechDevOps.com
Resources Tools
Experts in Microsoft SQL Server on Windows, Linux, Containers | Clusters, Always On, FCI | Migrations, Cloud, Performance



DatabaseMail - Queuing
by BF (Principal Consultant; Architecture; Engineering)
2017-12-03









In a newly installed SQL Server 2016 Standard AlwaysON Cluster, DatabaseMail was continuously queuing.

After going through all the troubleshooting items, see SQL Server Database Mail - Success, Failure, Logs, Config, I was left with the exact same state as when I started - still a queue.

Next, I went to check the DatabaseMail.exe.config - it was missing ! And here is why.



Queueing:

Use MSDB
go
Exec sysmail_help_queue_sp @queue_type = 'Mail' ;

queue_type length state last_empty_rowset_time last_activated_time
mail 9 INACTIVE 2017-12-02 19:23:25.100 2017-12-02 19:23:25.087


SELECT * FROM msdb.dbo.sysmail_allitems order by send_request_date desc

sent_status
unsent



Solution: Re-create the DatabaseMail.exe.config: