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
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10656 Visits: 4894
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
One Orange Chip
One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)

Group: General Forum Members
Points: 29477 Visits: 39986
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
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10656 Visits: 4894
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
One Orange Chip
One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)

Group: General Forum Members
Points: 29477 Visits: 39986
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
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10656 Visits: 4894
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 (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 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
SSC-Addicted
SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)

Group: General Forum Members
Points: 491 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
Mr or Mrs. 500
Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)

Group: General Forum Members
Points: 526 Visits: 1051
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
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 2

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.


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