I found a possible way to get the message -- you can use DBCC OUTPUTBUFFER (passing the spid) to get the output xp_sendmail sends to the console and parse through that to get the error number/message. If anyone can think of an easier way, let me know.
I have a procedure that calls xp_sendmail. I would like to capture errors that occur when xp_sendmail loses its connection to exchange, but even though the message is outputted to the screen in query analyzer and captured by the sql agent job history when running the procedure as a job, I...
Did you ever figure this one out?
I am experiencing the same error, but for possibly a different reason -- I have a sql agent job in SQL Server 2000 SP2 that runs every 10 minutes to send out any e-mail alerts I have stored in a database staging table. The job was running fine until a few days...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.