Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 High severity Error Capture

Author  Topic 

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2006-02-13 : 03:23:33
Is there any way to handle high severity error in a T-sql from a stored procedure

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-02-13 : 03:52:06
What do you mean by high severity error?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-02-13 : 04:09:11
you mean fatal to be non-fatal?

i guess you need to capture it and then handle it appropriately



--------------------
keeping it simple...
Go to Top of Page

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2006-02-13 : 04:54:48
In an Stored procedure non-fatal can be captured in this method but some of them can not be..Is there any way we can capture those fatal errors as well...
Declare @error_int
Execute @error_int =usp_emp_details_i
IF (@error_int <> 0 )
BEGIN
ROLLBACK TRAN
GOTO Error_Handler_Section
END
Go to Top of Page

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2006-02-13 : 06:43:45
When fatal error is being generated it completely gets out of the stored procedure.Is there any way to capture the error message as we get in SQL analyzer
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-02-13 : 07:24:13
Start with this
http://www.sommarskog.se/error-handling-I.html

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -