How to Handle the exceptions in Sqlsrver 2005??
Answer Posted / indraneelandhavarapu
With SQL Server 2005, new error handling has been introduced
with the TRY...CATCH processing. Basically what happens is
when an error occurs the processing in the TRY block stops
and processing is then picked up in the CATCH block.
ERROR_NUMBER() Returns the number of the error
ERROR_SEVERITY() Returns the severity
ERROR_STATE() Returns the error state number
ERROR_PROCEDURE() Returns the name of the stored procedure
or trigger where the error occurred
ERROR_LINE() Returns the line number inside the routine
that caused the error
ERROR_MESSAGE() Returns the complete text of the error
message. The text includes the values supplied for any
substitutable parameters, such as lengths, object names, or
times
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are audit control procedures?
What is perspective, have you ever created perspective? : sql server analysis services, ssas
What is the chart in report?
How do I start sql server 2016?
What is an expensive query?
You want to implement the one-to-one relationship while designing tables. How would you do it?
Recommend an approach to ensuring that all changes in the remote databases synchronize with the SQL Azure database?
What do we need queues in sql service broker?
How to get a list all databases on the sql server?
Explain about analysis services?
What are database states in ms sql server?
Disadvantages of the indexes?
How to link tables in sql server?
What is the maximum row of a size?
What are the different types of triggers in SQL SERVER?