• lsrep17 Documentation
  • Tables [dbo].[ErrorLog]
    Audit 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.
    PropertyValue
    CollationSQL_Latin1_General_CP1_CI_AS
    Row Count (~)0
    Created13:14:18 14 marca 2012
    Last Modified13:14:18 14 marca 2012
    KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefaultDescription
    Cluster Primary Key PK_ErrorLog_ErrorLogID: ErrorLogIDErrorLogIDint4
    False
    1 - 1Primary key for ErrorLog records.
    ErrorTimedatetime8
    False
    (getdate())The date and time at which the error occurred.
    UserName[sys].[sysname]256
    False
    The user who executed the batch in which the error occurred.
    ErrorNumberint4
    False
    The error number of the error that occurred.
    ErrorSeverityint4
    True
    The severity of the error that occurred.
    ErrorStateint4
    True
    The state number of the error that occurred.
    ErrorProcedurenvarchar(126)252
    True
    The name of the stored procedure or trigger where the error occurred.
    ErrorLineint4
    True
    The line number at which the error occurred.
    ErrorMessagenvarchar(4000)8000
    False
    The message text of the error that occurred.
    KeyNameKey ColumnsUniqueDescription
    Cluster Primary Key PK_ErrorLog_ErrorLogID: ErrorLogIDPK_ErrorLog_ErrorLogIDErrorLogID
    True
    Primary key (clustered) constraint
    CREATE TABLE [dbo].[ErrorLog]
    (
    [ErrorLogID] [int] NOT NULL IDENTITY(1, 1),
    [ErrorTime] [datetime] NOT NULL CONSTRAINT [DF_ErrorLog_ErrorTime] DEFAULT (getdate()),
    [UserName] [sys].[sysname] NOT NULL,
    [ErrorNumber] [int] NOT NULL,
    [ErrorSeverity] [int] NULL,
    [ErrorState] [int] NULL,
    [ErrorProcedure] [nvarchar] (126) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [ErrorLine] [int] NULL,
    [ErrorMessage] [nvarchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
    ) ON [PRIMARY]
    GO
    ALTER TABLE [dbo].[ErrorLog] ADD CONSTRAINT [PK_ErrorLog_ErrorLogID] PRIMARY KEY CLUSTERED  ([ErrorLogID]) ON [PRIMARY]
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Audit 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.', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', NULL, NULL
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'The line number at which the error occurred.', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', 'COLUMN', N'ErrorLine'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Primary key for ErrorLog records.', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', 'COLUMN', N'ErrorLogID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'The message text of the error that occurred.', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', 'COLUMN', N'ErrorMessage'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'The error number of the error that occurred.', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', 'COLUMN', N'ErrorNumber'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'The name of the stored procedure or trigger where the error occurred.', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', 'COLUMN', N'ErrorProcedure'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'The severity of the error that occurred.', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', 'COLUMN', N'ErrorSeverity'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'The state number of the error that occurred.', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', 'COLUMN', N'ErrorState'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'The date and time at which the error occurred.', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', 'COLUMN', N'ErrorTime'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'The user who executed the batch in which the error occurred.', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', 'COLUMN', N'UserName'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', 'CONSTRAINT', N'DF_ErrorLog_ErrorTime'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', 'CONSTRAINT', N'PK_ErrorLog_ErrorLogID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'dbo', 'TABLE', N'ErrorLog', 'INDEX', N'PK_ErrorLog_ErrorLogID'
    GO