USE [HCITools]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

IF  NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Stats_SP]') AND type in (N'U'))
BEGIN
    

    CREATE TABLE [dbo].[Stats_SP](
	    [Stats_SP_ID] [int] IDENTITY(1,1) NOT NULL,
	    [SS_schemaname] [sysname] NOT NULL,
	    [SS_databasename] [sysname] NOT NULL,
	    [SS_name] [sysname] NULL,
	    [SS_type] [nvarchar](60) NULL,
	    [SS_execution_count] [bigint] NULL,
	    [SS_last_execution_time] [datetime] NULL,
	    [SS_total_worker_time] [bigint] NULL,
	    [SS_total_physical_reads] [bigint] NULL,
	    [SS_total_logical_writes] [bigint] NULL,
	    [SS_total_logical_reads] [bigint] NULL,
	    [SS_total_elapsed_time] [bigint] NULL,
	    [SS_updatedate] [datetime] NULL,
	    [SS_restartdate] [datetime] NULL,
     CONSTRAINT [PK_Stats_SP_1] PRIMARY KEY CLUSTERED 
    (
	    [Stats_SP_ID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY]

END
GO
