USE [HCITools]
GO

/****** Object:  Table [dbo].[SQL_Errors]    Script Date: 03/07/2016 15:58:29 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SQL_Errors]') AND type in (N'U'))
DROP TABLE [dbo].[SQL_Errors]
GO

/****** Object:  Table [dbo].[SQL_Errors]    Script Date: 03/07/2016 15:58:29 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

IF NOT EXISTS (SELECT 1
                 FROM sys.objects o WITH (NOLOCK)
                 JOIN sys.schemas s WITH (NOLOCK) ON o.schema_id = s.schema_id
                WHERE o.name = 'SQL_Errors'
                  AND o.type IN (N'U')
                  AND s.name = 'dbo')
BEGIN

  CREATE TABLE [dbo].[SQL_Errors](
	[ServerName] [nvarchar](50) NULL,
	[AppName] [nvarchar](128) NULL,
	[UserName] [sysname] NULL,
	[ObjectName] [sysname] NULL,
	[Date] [datetime] NULL,
	[SourceType] [tinyint] NULL,
	[ErrorMessage] [varchar](max) NULL
  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

END
GO

SET ANSI_PADDING ON
GO


