February 19, 2015 at 9:13 am
Hi
I am executing on SP from SQL agent job and i have used the error handling in SP using try cTHIS IS CLEARLY SPAMthod and i am catching the errors, it is working fine if any error happened then it is going to catch block and catch block i have used RAISERROR, but my problem is agent job is not failing when we got any error in SP. my requirement is if any error occurred in SP first we need to catch those errors and insert into one table then the calling agent job should fail. how can we do this.
i am using SQL server 2008 R2.
please help me.
Regards
BSL
February 19, 2015 at 9:16 am
Sorry i have corrected the POST.
Hi
I am executing one SP from SQL agent job and i have used the error handling in SP using try cTHIS IS CLEARLY SPAMthod and i am catching the errors, it is working fine if any error happened then it is going to catch block and catch block i have used RAISERROR, but my problem is agent job is not failing when we got any error in SP. my requirement is if any error occurred in SP first we need to catch those errors and insert into one table then the calling agent job should fail. how can we do this.
i am using SQL server 2008 R2.
please help me.
Regards
BSL
February 19, 2015 at 9:31 am
What is the severity level of the raiserror?
February 19, 2015 at 9:36 am
HI
i am getting severity level as 1
February 19, 2015 at 9:43 am
You might need to change the severity level you use in the RAISERROR command.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply