Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Database Mail Queue stuck in INACTIVE State - can't get Database Mail to work on Server Expand / Collapse
Author
Message
Posted Friday, March 23, 2012 8:46 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Monday, September 29, 2014 10:57 PM
Points: 4,242, Visits: 4,290
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/

Post #1271710
Posted Friday, March 23, 2012 8:59 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 1:11 PM
Points: 12,905, Visits: 32,161
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1271720
Posted Friday, March 23, 2012 9:18 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Monday, September 29, 2014 10:57 PM
Points: 4,242, Visits: 4,290
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/

Post #1271748
Posted Friday, March 23, 2012 9:48 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 1:11 PM
Points: 12,905, Visits: 32,161
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1271783
Posted Friday, March 23, 2012 9:54 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Monday, September 29, 2014 10:57 PM
Points: 4,242, Visits: 4,290
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.


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/

Post #1271795
Posted Tuesday, May 20, 2014 12:12 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 27, 2014 4:34 PM
Points: 1, 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".
Post #1572830
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse