Users: 15,000+ | Page Views: 50,000+ | PPS: 2.5
TechDevOps.com
Explore Tools
{Experts in Microsoft SQL Server Operations, Performance, HA/DR, Data Migrations & Cloud Computing}



DatabaseMail - Queuing
by BF (Senior MSSQL Operations - Enterprise, Cloud, Strategy)
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: