24th May, 2007

SQLMail hung in schedule job - restart it without restart SQL Server services

I set up sqlmail in our SQL Server 2000 server in a Windows 2000 machine to send out email reminder. I have a daily schedule job to run a stored procedure that I created and execute xp_sendmail to send out the email reminder.
One day it just stopped working…

I went to enterprised manager to check on the job history and found the job is still in “executing” phases and never ended, it has been running for more than 4 hours! I tried restart sqlserver agent, killed the hung process and the process just didn’t go away(stay at “KILLED\ROLLBACK” status even the job is just a simple xp_sendmail task). I tried xp_stopmail and got the message:
xp_stopmail: Failed to stop SQL Mail session.

Many posts I found online recommended to restart the SQL Server services but I really didn’t want to have downtime at all for my users, so I continue reading and search online…

Fortunately, I came across a post regarding killing the “MAPISP32.EXE” from the Task Manager. Running out of choice so I gave it a try, and right after I killed the “MAPISP32.EXE” process my “KILLED\ROLLBACK” processes went away(finally! after hung there for 8 hours)! I then went to query analyzer and issued
xp_stopmail
xp_startmail

After that I tried to send out a test email using xp_sendmail and everything just work fine!

I came across the problem again this morning and here are the steps I did to make the hung SQLMail go away:

Step 1: login to the Server, opened up Task Manager, find MAPISP32.EXE and ended the process

Step 2: open up Query Analyzer, execute
xp_stopmail
xp_startmail

to restart SQLMail

Step 3: Test the SQLMail by execute
exec master.dbo.xp_sendmail @recipients = 'youremail@yourdomain.com',
@subject = 'test sqlmail after restart',
@message = 'test sqlmail after restart - email body'

Good luck and hope this help.

Responses

thanks, that was a great tip & solved my issue

i am using sqlserver 2000 in windows2000 i would like to take report by a query and send it a mail address is it possible

Leave a response

Your response:

Categories

http://other.balamba.net/ http://for.balamba.net/ http://from.balamba.net/ http://frozen.balamba.net/ http://metro.balamba.net/ pale lesbian black black having man man sex led photo facial nude anime teen george michael fastlove mp3 jason anderson mp3 http://gigmp3.net http://blekly.net/ http://balamba.net/ some cut mp3
every mp3 time touch we adult mature video woman xxx real r kelly sex tape gay marriage laws in europe so what miles davis mp3 http://tomymp3.com/ http://glasshok.com/ xxx nineteen lesb my home Blog hot blog escort mature in london plavi orkestar odlazim mp3 bitch bury dig ditch artica myspace.com site sonata Arsis- We Are The Nightmare(video Version 1 And 2) face pic adult adult blooper videos porn for mp4 sexy guys with abs porn junky black celebrity man screensaver sexy