Home > Archive > MS SQL Server > October 2006 > Problem Jobs with send mails









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Problem Jobs with send mails
Jesus Suarez

2006-10-31, 12:15 am

hello people,

i have a stored procedure that send mails masive to users, this stored
procedures succesfully execute manually, but programming job for execute
this stored procedurre not send mail, but histoyr job its succesfully.

what its happening?


John Bell

2006-10-31, 7:12 pm

Hi Jesus

You don't say how you are sending the emails, but if the procedure does not
raise an error and only returns an status code then you would need to check
this status code asnd raise your own error to make the step fail.

HTH

John

"Jesus Suarez" wrote:

> hello people,
>
> i have a stored procedure that send mails masive to users, this stored
> procedures succesfully execute manually, but programming job for execute
> this stored procedurre not send mail, but histoyr job its succesfully.
>
> what its happening?
>
>
>

Jesus Suarez

2006-10-31, 7:12 pm

hello

send mail using xpsmtp, but i dont undertand you, the storede procedure not
error, only if execute this stored procedured using jobs
"John Bell" < jbellnewsposts@hotma
il.com> escribió en el mensaje
news:FA1FF0E8-207A-4D7D-9886- CA18B58CC286@microso
ft.com...[color=darkred]
> Hi Jesus
>
> You don't say how you are sending the emails, but if the procedure does
> not
> raise an error and only returns an status code then you would need to
> check
> this status code asnd raise your own error to make the step fail.
>
> HTH
>
> John
>
> "Jesus Suarez" wrote:
>


Tibor Karaszi

2006-10-31, 7:12 pm

Did you specify an output file for the job step and check for messages in that output file?

According to http://sqldev.net/xp/xpsmtp.htm, any error from xp_smtp_sendmail should return a return
code, also accompanied by an error message.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/



"Jesus Suarez" <suarez.lopezjesus@gmail.com> wrote in message
news:%230LivVP$GHA.4980@TK2MSFTNGP04.phx.gbl...
> hello
>
> send mail using xpsmtp, but i dont undertand you, the storede procedure not error, only if execute
> this stored procedured using jobs
> "John Bell" < jbellnewsposts@hotma
il.com> escribió en el mensaje
> news:FA1FF0E8-207A-4D7D-9886- CA18B58CC286@microso
ft.com...
>
>



John Bell

2006-10-31, 7:12 pm

Hi Jesus

xp_smtp_sendmail will return 1 if there is a problem, you may want to create
a test job that just sends a test email and selects the return code.
e.g.

DECLARE @rc int
EXEC @rc = xp_smtp_sendmail.....
SELECT @rc

Add a log file in the advanced tab of the step so that you have a copy of
the output from the step, this may give you some indication of any error. You
may also need to change the SQL Agent service account to be a domain account
if network access is an issue.

John

"Jesus Suarez" wrote:

> hello
>
> send mail using xpsmtp, but i dont undertand you, the storede procedure not
> error, only if execute this stored procedured using jobs
> "John Bell" < jbellnewsposts@hotma
il.com> escribió en el mensaje
> news:FA1FF0E8-207A-4D7D-9886- CA18B58CC286@microso
ft.com...
>
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com