dbo.ErrorLog Table

Information

NameErrorLog
Schemadbo
Row Count0
Data Size 
Index Size 
Reserved Size 
Unused Size 
Created29.3.2010. 21:58:18
Modified29.3.2010. 21:58:18

Extended Properties

NameTypeProperty NameValue
ErrorLogTABLEMS_DescriptionAudit table tracking errors in the the AdventureWorks database that are caught by the CATCH block of a TRY...CATCH construct. Data is inserted by stored procedure dbo.uspLogError when it is executed from inside the CATCH block of a TRY...CATCH construct.

Columns

PKKeyIdentityNameData TypeAllow NullsCollationReferencesDefaultComputedCompute Expression
   ErrorLogIDint   
 
 
 
   ErrorTimedatetime   
(getdate())
 
 
   UserNamenvarchar(128) SQL_Latin1_General_CP1_CI_AS 
 
 
 
   ErrorNumberint   
 
 
 
   ErrorSeverityint   
 
 
 
   ErrorStateint   
 
 
 
   ErrorProcedurenvarchar(126) SQL_Latin1_General_CP1_CI_AS 
 
 
 
   ErrorLineint   
 
 
 
   ErrorMessagenvarchar(4000) SQL_Latin1_General_CP1_CI_AS 
 
 
 

Indexes

NameTypePrimaryUniqueColumns
PK_ErrorLog_ErrorLogIDClustered  ErrorLogID

SQL Script

CREATE TABLE [dbo].[ErrorLog] (
    [ErrorLogID] int NOT NULL IDENTITY,
    [ErrorTime] datetime NOT NULL DEFAULT (getdate()),
    [UserName] nvarchar(128) NOT NULL,
    [ErrorNumber] int NOT NULL,
    [ErrorSeverity] int NULL,
    [ErrorState] int NULL,
    [ErrorProcedure] nvarchar(126) NULL,
    [ErrorLine] int NULL,
    [ErrorMessage] nvarchar(4000) NOT NULL
);