How to get dbmail to process items from a queue for SQL Server 2005?

When I use the sp_send_dbmail stored procedure, I get a message that my mail has been queued. However, it never seems to be shipped. I can see them in the queue if I run this SQL:

SELECT * FROM msdb..sysmail_allitems WHERE sent_status = 'unsent' 

This SQL returns 1:

 SELECT is_broker_enabled FROM sys.databases WHERE name = 'msdb' 

This stored procedure returns START:

 msdb.dbo.sysmail_help_status_sp 

Corresponding accounts and profiles are created, and mail works at one point. There are no errors in msdb.dbo.sysmail_event_log.

+4
source share
3 answers

Maybe a bunch of things. For example, I saw (yes, actually saw) this happens after:

  • Rebooting a domain controller
  • Rebooting Exchange Server
  • Disabling the router.
  • Service Account Changes
  • Not enough disk space in SQL Server

So, until this happens again, I will not worry about him.

+1
source

You tried

 sysmail_stop_sp 

then

 sysmail_start_sp 
+2
source

I had the same problem, and that is how I was able to solve it.

Go to Sql Agent → Properties → Alert System → Check the Enable box for DBMail and add a profile.

Restart the Agent and it has been working since.

Hope this helps, _Ub

+2
source

Source: https://habr.com/ru/post/1276322/


All Articles