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
Does any body please help me what question's have asked for SSRS in the interview?
What is merge replication?
How to set database to be single_user in ms sql server?
What is the difference between ‘having’ clause and a ‘where’ clause?
What is sql server locking?
What are sp_configure commands and set commands?
How to create a simple table to test triggers in ms sql server?
How to convert binary strings into integers in ms sql server?
What are the system database in sql server 2008?
What is a unique key constraint?
How to drop an existing table with "drop table" statements in ms sql server?
How to delete database objects with "drop" statements in ms sql server?
How many types of dimensions are there and what are they? : sql server analysis services, ssas
Mention what are the different types of ssrs reports?
Explain what are the database objects? : SQL Server Architecture