Skip to content

Instantly share code, notes, and snippets.

@matijagrcic
Forked from mivano/create log table
Last active August 29, 2015 14:06
Show Gist options
  • Save matijagrcic/792facbb094ee0e3aa39 to your computer and use it in GitHub Desktop.
Save matijagrcic/792facbb094ee0e3aa39 to your computer and use it in GitHub Desktop.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Logs](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Message] [nvarchar](max) NULL,
[MessageTemplate] [nvarchar](max) NULL,
[Level] [nvarchar](128) NULL,
[TimeStamp] [datetime] NOT NULL,
[Exception] [nvarchar](max) NULL,
[Properties] [xml] NULL,
CONSTRAINT [PK_Logs] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment