Unanswered: Database Mail failure
Have code where, when a used performs a certain action, I use the sp_send_dbmail to send an eMail to another user.
Sometimes it works, sometimes it doesn't, and here is the issue . . .
Apparently, the Database Mail service terminates, automatically, after a certain period of inactivity. The parameter is controlled in SQL Server Management Studio>>Management>>Database Mail>>Configure Database Mail>>View or Change System Parameters under the parameter Database Mail Executable Minimum Lifetime. Microsoft's default setting for this parameter is 600 seconds, or 10 minutes.
That is all fine and good, except it appears that when you send an sp_send_dbmail while this process is in its terminated state, the process fails to re-initiate and the eMail is not sent, and no error is reported.
After a bit of research, I've changed that parameter to something much longer than 10 minutes, and that will server my purposes temporarily.
But I would like to solve the actual problem.
Why is it that sp_send_dbmail fails to re-initiate the Database Mail service?
In case you've done the same research as I, the SQL Server Agent Alert System has long been configured with a valid mail session profile and the mail does work when the Database Mail service is up and running.
Maverick Software Design
(847) 864-3600 x2