Table: [AdventureWorks2016CTP3].[dbo].[ErrorLog]

CollapseAll image

Collapse image Table properties


Name  Value 
 Schema  [dbo]
 Owner  [dbo]
 Table is replicated   
 Creation date  23.10.2015
 ID  597577167
 Located on  PRIMARY
 Data size KB  0 KB
 Index size KB  0 KB
 Rows  0
 ChangeTrackingEnabled   
 FileStreamFileGroup   
 FileStreamPartitionScheme   
 LockEscalation  TABLE
 TrackColumnsUpdatedEnabled   
 Table is filetable   
 Filetable directory   
 Filetable collate   
 Filetable primary key  [PK_ErrorLog_ErrorLogID]
 Filetable streamid unique   
 Filetable fullpath unique   
 Filetable is enabled   
 Is memory optimized   
 Durability  SCHEMA_AND_DATA

Collapse image Creation options


Name  Value 
QUOTED_IDENTIFIER ON
ANSI_NULLS ON
ANSI_PADDING ON

Collapse image Columns


    Name  Description  Data type  Max length  Nullable  Default IsGUID  SPARSE Computed value
Primary key Identity ErrorLogID     int 4        
    ErrorTime     datetime 8   (getdate())    
    UserName     sysname 128        
    ErrorNumber     int 4        
    ErrorSeverity     int 4      
    ErrorState     int 4      
    ErrorProcedure     nvarchar 126      
    ErrorLine     int 4      
    ErrorMessage     nvarchar 4000        
Total: 9 column(s)

Collapse image Indexes


Index  Description  Primary  Unique  Size KB 
[PK_ErrorLog_ErrorLogID] ErrorLogID   0 0
Total: 1 Index/indexes

Collapse image Columnstore indexes


No columnstore indexes exist

Collapse image Identity column


  Name  Seed  Increment  Not for replication 
 ErrorLogID   1   1   

Collapse image Triggers


Name  Schema  Description  Instead 
of 
For 
insert 
For 
update 
For 
delete 
Table/view 
[dbo].[tr_i_AUDIT_ErrorLog] [dbo]     For Insert     [dbo].[ErrorLog]
[dbo].[tr_d_AUDIT_ErrorLog] [dbo]         For Delete [dbo].[ErrorLog]
Total: 2 triggers(s)

Collapse image Objects that depend on [dbo].[ErrorLog]


Object name Object type Dep level
[dbo].[uspLogError] Procedure 1
[dbo].[tr_d_AUDIT_ErrorLog] Trigger 1
[dbo].[tr_i_AUDIT_ErrorLog] Trigger 1
Total 3 object(s)

Collapse image Extended properties


Name  Value 
MS_Description 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.

Collapse image Table options


Name  Value 
Pintable OFF
Table lock on bulk load OFF
Insert row lock OFF
Text in row 0
Large value types out of row OFF

Collapse image SQL


SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ErrorLog] (
        [ErrorLogID]         [int] IDENTITY(1, 1) NOT NULL,
        [ErrorTime]          [datetime] NOT NULL,
        [UserName]           [sysname] COLLATE SQL_Latin1_General_CP1_CI_AS 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,
        CONSTRAINT [PK_ErrorLog_ErrorLogID]
        PRIMARY KEY
        CLUSTERED
        ([ErrorLogID])
    ON [PRIMARY]
) ON [PRIMARY]
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
ALTER TABLE [dbo].[ErrorLog]
    ADD
    CONSTRAINT [DF_ErrorLog_ErrorTime]
    DEFAULT (getdate()) FOR [ErrorTime]
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'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'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

Collapse image See also


List of tables