Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Records all errors in the AdventureWorks database that are caught by the CATCH block of a TRY...CATCH construct. Data is inserted by the dbo.uspLogError stored procedure when that procedure is executed from inside the CATCH block of a TRY...CATCH construct.
ErrorLog Table Definition
The ErrorLog table is contained in the dbo schema.
Column | Data type | Nullability | Description |
---|---|---|---|
ErrorLogID |
int |
Not null |
Primary key for ErrorLog rows. |
ErrorTime |
datetime |
Not null |
Date and time the error occurred. |
UserName |
sysname |
Not null |
User that executed the batch in which the error occurred. |
ErrorNumber |
int |
Not null |
Error number of the error that occurred. |
ErrorSeverity |
int |
NULL |
Severity of the error that occurred. |
ErrorState |
int |
NULL |
State number of the error that occurred. |
ErrorProcedure |
nvarchar(126) |
NULL |
Name of the stored procedure or trigger where the error occurred. |
ErrorLine |
int |
NULL |
Line number at which the error occurred. |
ErrorMessage |
nvarchar(4000) |
Not null |
Message text of the error that occurred. |
See Also
Concepts
Stored Procedures in AdventureWorks
Other Resources
AdventureWorks Data Dictionary
TRY...CATCH (Transact-SQL)
Using TRY...CATCH in Transact-SQL