Files
sql-scripts/TPDT-268 - ACP in task sequence/dba_structure/Stats_index.sql
2024-03-07 16:52:14 +01:00

44 lines
1.3 KiB
Transact-SQL

USE [HCITools]
GO
/****** Object: Table [dbo].[Stats_index] Script Date: 05/10/2016 12:40:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER 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 = 'Stats_index'
AND o.type IN (N'U')
AND s.name = 'dbo')
BEGIN
CREATE TABLE [dbo].[Stats_index](
[Stats_index_ID] [int] IDENTITY(1,1) NOT NULL,
[SI_schemaname] [sysname] NOT NULL,
[SI_databasename] [sysname] NOT NULL,
[SI_tablename] [sysname] NOT NULL,
[SI_indexname] [sysname] NULL,
[SI_indextype] [nvarchar](60) NULL,
[SI_user_seeks] [bigint] NULL,
[SI_user_scans] [bigint] NULL,
[SI_user_lookups] [bigint] NULL,
[SI_user_updates] [bigint] NULL,
[SI_last_user_seek] [datetime] NULL,
[SI_last_user_scan] [datetime] NULL,
[SI_last_user_lookup] [datetime] NULL,
[SI_last_user_update] [datetime] NULL,
[SI_updatedate] [datetime] NULL,
[SI_restartdate] [datetime] NULL,
CONSTRAINT [PK_Stats_index_1] PRIMARY KEY CLUSTERED
(
[Stats_index_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]
END
GO