SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Database Mail Queue stuck in INACTIVE State - can't get Database Mail to work on Server


Database Mail Queue stuck in INACTIVE State - can't get Database Mail to work on Server

Author
Message
Welsh Corgi
Welsh Corgi
One Orange Chip
One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)

Group: General Forum Members
Points: 28274 Visits: 4895
Please post to the following:

http://www.sqlservercentral.com/Forums/Topic1276632-1550-4.aspx#bm1276973

I execute the following statement to check the status of Database Mail:


EXEC msdb.dbo.sysmail_help_queue_sp @queue_type = 'mail';



The mail queue should have the state of RECEIVES_OCCURRING

So I tried stopping the queue using sysmail_stop_sp and then starting the queue using sysmail_start_sp but it does not change the State.

Does anyone know what could be causing this problem and what I can do to resolve this issue?

Any help would be greatly appreciated.

For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Lowell
Lowell
SSC Guru
SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)

Group: General Forum Members
Points: 75555 Visits: 40987
I believe you are incorrect; the default state would be INACTIVE unless you query the queue at teh exact moment you are actually sending an email.

all four of my servers i just checked all show INACTIVE, nad one ran an email campaign this morning at 7am wiithout errors.

Lowell
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Welsh Corgi
Welsh Corgi
One Orange Chip
One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)

Group: General Forum Members
Points: 28274 Visits: 4895
Lowell (3/23/2012)
I believe you are incorrect; the default state would be INACTIVE unless you query the queue at teh exact moment you are actually sending an email.

all four of my servers i just checked all show INACTIVE, nad one ran an email campaign this morning at 7am wiithout errors.


Thanks for correcting me.

I sent mail and checked it and the status and it was still INACTIVE.

The problem is that all of the items are in the queue and none have been sent.

I tested SMTP Mail with Telnet and it worked.

Any suggestions?

Thanks again.

For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Lowell
Lowell
SSC Guru
SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)SSC Guru (75K reputation)

Group: General Forum Members
Points: 75555 Visits: 40987
i found some interesting stuff about service queues not having a unique GUID over here:
http://stackoverflow.com/questions/1127404/service-broker-with-sql-server-2005-messages-stuck-in-queue

I know i've had a situation a couple of times where the service just doesn't seem to send mail, and the procs for starting and stiopping the mail service were ineffective; the only solution was to stop and start the SQL service, which fixed the issue immediately.


I've never had the service in that situation where it was stuck, AND i could write any diagnostics to detect what the core issue was; I've had to bounce the serice immediately for biz reasons.

Lowell
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Welsh Corgi
Welsh Corgi
One Orange Chip
One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)

Group: General Forum Members
Points: 28274 Visits: 4895
I had already tried restarting the SQL Server Service but no luck.

I used the same script to configure Database mail that I used on another new Server a month ago and I did not have any problems.

I'm feeling like what's wrong that I can't figure this out.Blush

For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
ajosephson
ajosephson
Grasshopper
Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)

Group: General Forum Members
Points: 23 Visits: 4
I ran into a similar problem with mail not being sent even though everything is configured correctly. The problem turned out to be the name of my mail profile! I had a space in it. So when I changed "Mail Profile" to "MailProfile", everything worked fine and the mail queue state correctly changed from "INACTIVE" to "RECEIVES_OCCURRING".
C# Gnu
C# Gnu
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1289 Visits: 659
Just to say restarting sql server services also solved this problem for me.

C# Gnu
____________________________________________________


Excel Database Tasks : efficient business data processing
Version 3.3 released February 2015

lsalih
lsalih
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1565 Visits: 1059
I know this is an old post, but I wanted to add this since lately we have been dealing with few failures of SQL Mail not sending email.
1) If EXECUTE dbo.sysmail_start_sp does not work, then go to task manager and stop/start the databasemail process. The process name is DatabaseMail.exe. Once you started the process, send test mail using the profile(s) you have to clear the unsent mail queue.



eggerts2k
eggerts2k
SSC Rookie
SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)

Group: General Forum Members
Points: 39 Visits: 6

I realize this is an old post, but the issue for me was the .net 3.5 framework was not installed (Win2K12R2/SQL2016 - new installation) and as such the databasemail.exe was unable to run.


OracleGuy
OracleGuy
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 6
@eggerts2k It may have been an old post but THANKS for the note regarding the .Net 3.5 installation. I spend 4 hrs trying to figure out why I was having this problem after enabling mail on a 2012 server I inherited. I saw your note and checked the installed features. Net4.0 was installed but 3.5 was not. 5 minutes later 3.5 was installed and the problem was resolved.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search