August 18, 2010 at 10:56 pm
i am writing several stored procedures for seding database mails . I execute all those mail stored procedures insidea Store procedure . When i last added a Mail sp to it this Stored Procedure . that mail alone is not getting executed in the job . all other sp's get executed and mail is sent .
here i show the sample code for better understanding .
BEGIN TRY
exec ril_actuals_exceeding_budget_mail
insert into RIL_Mail_Execution_report values(getdate(),'ril_actuals_exceeding_budget_mail','Executed')
END TRY
BEGIN CATCH
insert into RIL_Mail_Execution_report values(getdate(),'ril_actuals_exceeding_budget_mail','Catched')
END CATCH
there are lot of sp's called in the similar fashion like this . this is the sp which is not executing . When i execute this sp alone the mail is sent . so i think there is no problem with mail sp . i think the above coding is getting updated . pls help me in it .
August 23, 2010 at 7:00 am
[font="Verdana"]Do one thing, first comment all the mail shooting sp's which are working fine except the faulty sp and try to dig around it.
Also let us know, can't you write a SSIS package where you can put all your sp's there with container so that you will get exact problem.
anyways, let us know in more details, what exact the problem you are facing, like any error your final sp is throwing or any unexpected behavior?
Thanks,
Mahesh[/font]
MH-09-AM-8694
August 24, 2010 at 9:27 am
If you run this code manually, does it do what you expect it to do?
exec ril_actuals_exceeding_budget_mail
if not, can you provide the code for that?
what shows up in RIL_Mail_Execution_report values table? Is this part of a transaction that might be getting rolled back? How is this called?
For better, quicker answers, 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/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply