Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databaseshello 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?
Post Follow-up to this messageHi 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? > > >
Post Follow-up to this messagehello 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... > 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: >
Post Follow-up to this messageDid you specify an output file for the job step and check for messages in th at output file? According to http://sqldev.net/xp/xpsmtp.htm, any error from xp_smtp_sendmai l 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 no t 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... > >
Post Follow-up to this messageHi 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. Yo u 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 no t > 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... > > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread