Click here to Skip to main content
15,881,870 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
Hi All,

I am working on error handing functionality in SQL Server 2005. Now I want concept of error handling in SQL Server 2005 (Please provide me only concept not source code).

#1. I write a code with TRY…CATCH and use RAISEERROR function with error message.
Issue : I am getting very sort information about error. I require more than these information.

#2. Create error table and store error and relative information in that table.
Issue how to retrieve error information from that table on outer most CATCH block. Can I use unique ID for that and pass that it in the RAISEERROR function.

Please suggest me solutions and if you have any other way for error handing in SQL Server 2005 please provide me I am very thank full to you.

I really need strong error handing plan.

Thanks in Advance.

Posted
Comments
Dalek Dave 21-Oct-11 3:39am    
Good Question, well laid out.

 
Share this answer
 
Comments
angle57 21-Oct-11 5:52am    
Thanks,

your mention links wares vary useful to me. I got other link from you’re your links and finally I got my answer.

Thanks a lot:)
Uday P.Singh 21-Oct-11 6:08am    
you are welcome :)
Amir Mahfoozi 6-Dec-11 2:03am    
+5 nice links
Uday P.Singh 6-Dec-11 2:13am    
thanks Amir :)
Please have a look at this like.

Here MSDN says create error log table and output the Identity to outer CATCH block.

Using TRY...CATCH in Transact-SQL

Thanks for Solution 1.:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900