December 3, 2013 at 6:40 pm
I have stored procedure where I use try and catch block.I call that store procedure from within SSIS (execute sql task) to load data. The problem i have is if any error occurs the catch block traps and is logged into a table and exits without failing the package. I want to be able to trap the error as well as fail the package(fail store procedure in this case which will automatically fail the task/package)?
Any thoughts.
December 3, 2013 at 7:44 pm
peacesells (12/3/2013)
I have stored procedure where I use try and catch block.I call that store procedure from within SSIS (execute sql task) to load data. The problem i have is if any error occurs the catch block traps and is logged into a table and exits without failing the package. I want to be able to trap the error as well as fail the package(fail store procedure in this case which will automatically fail the task/package)?Any thoughts.
I think that your "problem" is that SSIS is seeing the status of the last command in the sproc. I think that this will be in the CATCH block and that command worked. What you need is to do finish with a RAISERROR which SSIS will notice and should then fail the task/package
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply