Handling Database Engine Errors SQL Server 2008 R2

Database error contains an error number, message string, severity, state, and procedure name and line number.  Error can be handled in the database by adding error-handling code to translate-sql, batches, procedure, trigger or function. Each application use to access database, provide mechanisms for passing the error to application.

Error Number Each error message has a unique error number.
Error message string The error message contains diagnostic information about the cause of the error.
Severity The severity indicates how serious the error is.
State Some error messages can be raised at multiple points in the code for the Database, This information might provide additional ideas on how to diagnose the problem.
Procedure name Is the name of the stored procedure or trigger in which the error has occurred.
Line number Indicates which statement in a batch, stored procedure, trigger, or function generated the error.

Leave a Comment

Your email address will not be published. Required fields are marked *