on 04-17-2017 11:17 AM
Hi Experts,
I need one help actually my requirement is i have to use one stored procedure into my job which is nothing but a simple query to create table in the database.If any error occurred in stored procedure during the job execution how to capture that error info into a control table please suggest.
Thanks in advance..
You can catch the error using TRY-CATCH. In the CATCH block you can use 'error_message( )' for catching error occurred during execution of the stored procedure.
The 'error_message( )' will provide you all type of error during execution including sql statement error.
Thus you can capture and insert the error message into your control table with your own logic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.