Not applicable

How to get Error in Stored Procedure

Hello together,
maybe its a simple question.
Actually we are trying to call a stored procedure at SQL Server 2008R2.
The stored procedure should process a cube.
This works fine for us.
What we want to know is, are we able, if processing fails, to recieve a error message on which step the sp failed?
Maybe like the Messages at SQL Server Agent -> Jobs?
Hopefully i could explain what we want to do.
Best regards,
Marco
4 REPLIES
Four Stars

Re: How to get Error in Stored Procedure

Hi Marco,
Are you using Talend to execute stored procedure?....
If yes, then the stored procedure executes at the database server end. Error which is generated will be also at server end. I can think of an workaround... whatever output of sp you redirect it to flat file and let talend read that file and check for some key word as error etc....
Let us know exact scenario what you are working on...
Thanks
Vaibhav
Not applicable

Re: How to get Error in Stored Procedure

The exact scenario we are working on is, that we have several SQL Server Jobs for processing different Cubes.
We want to process Cubes in future with Talend, that we can delete the SQL Server Jobs.
But we need to see if processing failed (if we need to take any action and what exactly the error message is)
Best regards,
Marco
Four Stars

Re: How to get Error in Stored Procedure

Hi Marco,
We can setup connection to sql server through talend. Once the connection is setup, then we can do any type of processing which is required. During due process of execution, whatever error occurs that is pinged back to talend by the server. Say if the connection to the server has some error, then whatever error appears is displayed on console.
Same would be case with sp. We should return the error occurred during the execution. Now it depends on the way sp is written to get the details of failure point.
I think yes, we should be able execute cubes through talend using sp.
Thanks
Vaibhav

Re: How to get Error in Stored Procedure

Hi,
I have a SOAP web service job, where i am invoking MSSQL Stored procedure. If stored procedure returns success response , i dont have any problem with my flow. but if stored procedure return error , by default it throws SOAP fault to the consumer.
Is there a way, where i can over ride this SOAP Fault message and convert into Business Exception?
I tried catching the stored procedure error in the tLogCatcher, but it is not working out.
Thanks in advance.