-- SQL Manager 2008 Lite for SQL Server 3.4.0.5
-- ---------------------------------------
-- Host      : (LOCAL)\ATENEO
-- Database  : ateneo
-- Version   : Microsoft SQL Server  10.0.1600.22
--COLLATE SQL_Latin1_General_CP1_CI_AI
--COLLATE SQL_Latin1_General_CP1_CI_AI

CREATE DATABASE [ateneo]
COLLATE SQL_Latin1_General_CP1_CI_AI
GO


USE [ateneo]
GO

--
-- Definition for table AccionesHoy : 
--


CREATE TABLE [dbo].[AccionesHoy] (
  [Id] int IDENTITY(1, 1) NOT NULL,
  [Puesto] nvarchar(3) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Codigo] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Turno] nvarchar(1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [TiempoLibre] int DEFAULT 0 NULL,
  [TiempoOcupado] int DEFAULT 0 NULL,
  [TiempoDescanso] int DEFAULT 0 NULL,
  [HoraUltimoMovimiento] datetime NULL,
  [FechaConexion] datetime DEFAULT CONVERT([datetime],CONVERT([varchar],getdate(),(1)),(0)) NULL,
  [Centro] nvarchar(5) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Citas] smallint DEFAULT 0 NULL,
  [CitaMultiple] smallint DEFAULT 0 NULL,
  [Estado] nvarchar(1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Cola] nvarchar(2) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT '  ' NULL
)
ON [PRIMARY]
GO

--
-- Definition for table Candidatos : 
--

CREATE TABLE [dbo].[Candidatos] (
  [Id] int IDENTITY(1, 1) NOT NULL,
  [Nif] nvarchar(20) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Nombre] nvarchar(40) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [HoraCita] datetime NULL,
  [Estado] nvarchar(1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [HoraCalculada] datetime NULL,
  [HoraAtendido] datetime NULL,
  [HoraPresente] datetime NULL,
  [HoraCalculada2] datetime NULL,
  [Turno] nvarchar(1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [CitaMultiple] int DEFAULT 0 NULL,
  [NumeroTicket] nvarchar(6) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Cola] nvarchar(2) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Operador] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [HoraFinalizado] datetime NULL,
  [CodigoEstadistico] nvarchar(4) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [CitaVinculada] nvarchar(19) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT '     ' NULL,
  [CodigoGestor] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [NIU] nvarchar(20) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Mesa] nvarchar(10) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [HoraPresente2] datetime NULL,
  [NombreCola] nvarchar(25) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [GHuecos] bit DEFAULT 0 NULL,
  [DNIe] bit DEFAULT 0 NULL,
  [Origen] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT 'Ateneo' NULL,
  [CP] bit DEFAULT 0 NULL,
  [Centro] nvarchar(5) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Notas] varchar(max) COLLATE SQL_Latin1_General_CP1_CI_AI NULL
)
ON [PRIMARY]
GO

--
-- Definition for table CategoriasEsta : 
--

CREATE TABLE [dbo].[CategoriasEsta] (
  [Id] int IDENTITY(1, 1) NOT NULL,
  [CodigoEstadistico] nvarchar(4) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [CategoriaEsta] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AI NULL
)
ON [PRIMARY]
GO

--
-- Definition for table Colas : 
--

CREATE TABLE [dbo].[Colas] (
  [Id] int IDENTITY(1, 1) NOT NULL,
  [Cola] nvarchar(2) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT '0' NULL,
  [Descripcion] nvarchar(25) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT '' NULL,
  [Bonificacion] smallint DEFAULT 0 NULL,
  [Numero] smallint DEFAULT 0 NULL,
  [Activa] bit DEFAULT 0 NOT NULL,
  [CodigoEstadistico] nvarchar(4) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT '' NULL,
  [CitaPrevia] bit DEFAULT 0 NOT NULL,
  [cerrada] bit DEFAULT 0 NOT NULL,
  [UmbralSuplencia] int DEFAULT 0 NULL,
  [tiempoMedio] int DEFAULT 300 NULL,
  [IdSalaEspera] int DEFAULT '' NULL,
  [NifObligatorio] bit DEFAULT 0 NOT NULL,
  [ColaEspecial] bit DEFAULT 0 NOT NULL,
  [HuecosOpe] bit DEFAULT 1 NOT NULL
)
ON [PRIMARY]
GO

--
-- Definition for table confiSer : 
--

CREATE TABLE [dbo].[confiSer] (
  [parametro] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [valor] nvarchar(200) COLLATE SQL_Latin1_General_CP1_CI_AI NULL
)
ON [PRIMARY]
GO

--
-- Definition for table GeneradorCitas : 
--

CREATE TABLE [dbo].[GeneradorCitas] (
  [Cola] nvarchar(2) COLLATE SQL_Latin1_General_CP1_CI_AI NOT NULL,
  [Turno] nvarchar(1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [HoraInicio] datetime NOT NULL,
  [HoraFin] datetime NOT NULL,
  [Duracion] int NULL,
  [Puestos] int NULL,
  [UltimaEjecucion] datetime NULL
)
ON [PRIMARY]
GO

--
-- Definition for table HistoricoAcciones : 
--

CREATE TABLE [dbo].[HistoricoAcciones] (
  [Id] int IDENTITY(1, 1) NOT NULL,
  [Puesto] nvarchar(3) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Codigo] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Turno] nvarchar(1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [TiempoLibre] int DEFAULT 0 NULL,
  [TiempoOcupado] int DEFAULT 0 NULL,
  [TiempoDescanso] int DEFAULT 0 NULL,
  [HoraUltimoMovimiento] datetime NULL,
  [FechaConexion] datetime DEFAULT CONVERT([datetime],CONVERT([varchar],getdate(),(1)),(0)) NULL,
  [Centro] nvarchar(5) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Citas] smallint DEFAULT 0 NULL,
  [CitaMultiple] smallint DEFAULT 0 NULL,
  [Estado] nvarchar(1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Cola] nvarchar(2) COLLATE SQL_Latin1_General_CP1_CI_AI NULL
)
ON [PRIMARY]
GO

--
-- Definition for table HistoricoCandidatos : 
--

CREATE TABLE [dbo].[HistoricoCandidatos] (
  [Id] int IDENTITY(1, 1) NOT NULL,
  [Nif] nvarchar(20) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Nombre] nvarchar(40) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [HoraCita] datetime NULL,
  [Estado] nvarchar(1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [HoraCalculada] datetime NULL,
  [HoraAtendido] datetime NULL,
  [HoraPresente] datetime NULL,
  [HoraCalculada2] datetime NULL,
  [Turno] nvarchar(1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [CitaMultiple] int DEFAULT 0 NULL,
  [NumeroTicket] nvarchar(6) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Cola] nvarchar(2) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Operador] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [HoraFinalizado] datetime NULL,
  [CodigoEstadistico] nvarchar(4) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [CitaVinculada] nvarchar(19) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT '     ' NULL,
  [CodigoGestor] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [NIU] nvarchar(20) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Mesa] nvarchar(10) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [HoraPresente2] datetime NULL,
  [NombreCola] nvarchar(25) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [GHuecos] bit DEFAULT 0 NULL,
  [DNIe] bit DEFAULT 0 NULL,
  [Origen] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT 'Ateneo' NULL,
  [CP] bit DEFAULT 0 NULL,
  [Centro] nvarchar(5) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Notas] varchar(max) COLLATE SQL_Latin1_General_CP1_CI_AI NULL
)
ON [PRIMARY]
GO

--
-- Definition for table Huecos : 
--

CREATE TABLE [dbo].[Huecos] (
  [Id] int IDENTITY(1, 1) NOT NULL,
  [HoraCita] datetime NULL,
  [Cola] nvarchar(2) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Turno] nvarchar(1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL
)
ON [PRIMARY]
GO

--
-- Definition for table mensajesGestores : 
--

CREATE TABLE [dbo].[mensajesGestores] (
  [Id] int IDENTITY(1, 1) NOT NULL,
  [hora] datetime NULL,
  [codigo] int NULL,
  [mensaje] nvarchar(300) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [gestor] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AI NULL
)
ON [PRIMARY]
GO

--
-- Definition for table Operadores : 
--

CREATE TABLE [dbo].[Operadores] (
  [Id] int IDENTITY(1, 1) NOT NULL,
  [codigo] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Nombre] nvarchar(35) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Capacidad] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT '' NULL,
  [Activo] bit DEFAULT 0 NOT NULL,
  [Favoritas] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AI CONSTRAINT [DF_Operadores_Favoritas] DEFAULT '' NULL,
  [Suplencias] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT '' NULL,
  [FavEstadisticas] nvarchar(150) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [Centro] nvarchar(5) COLLATE SQL_Latin1_General_CP1_CI_AI NULL
)
ON [PRIMARY]
GO

--
-- Definition for table Productos : 
--

CREATE TABLE [dbo].[Productos] (
  [fecha] datetime NULL,
  [operador] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [mesa] nvarchar(10) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [nif] nvarchar(20) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [nombreProcedimiento] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [datos] nvarchar(250) COLLATE SQL_Latin1_General_CP1_CI_AI NULL
)
ON [PRIMARY]
GO

--
-- Definition for table puestos : 
--

CREATE TABLE [dbo].[puestos] (
  [puesto] nvarchar(3) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [capacidades] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT '' NULL,
  [exclusivo] bit DEFAULT 0 NOT NULL,
  [IdSalaAtencion] int DEFAULT 0 NULL
)
ON [PRIMARY]
GO

--
-- Definition for table RangoHuecos : 
--

CREATE TABLE [dbo].[RangoHuecos] (
  [Id] int IDENTITY(1, 1) NOT NULL,
  [Origen] nvarchar(2) COLLATE SQL_Latin1_General_CP1_CI_AI NOT NULL,
  [Destino] nvarchar(2) COLLATE SQL_Latin1_General_CP1_CI_AI NOT NULL
)
ON [PRIMARY]
GO

--
-- Definition for table SalasAtencion : 
--

CREATE TABLE [dbo].[SalasAtencion] (
  [IdSalaAtencion] int IDENTITY(1, 1) NOT NULL,
  [TextoSalaAtencion] nvarchar(18) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT '' NULL
)
ON [PRIMARY]
GO

--
-- Definition for table SalasEspera : 
--

CREATE TABLE [dbo].[SalasEspera] (
  [IdSalaEspera] int IDENTITY(1, 1) NOT NULL,
  [TextoSalaEspera] nvarchar(18) COLLATE SQL_Latin1_General_CP1_CI_AI DEFAULT '' NULL,
  [TiempoEspera] int DEFAULT 0 NULL
)
ON [PRIMARY]
GO

--
-- Definition for table Transmisiones : 
--

CREATE TABLE [dbo].[Transmisiones] (
  [tarea] nvarchar(15) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [parametros] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [resultado] nvarchar(2) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [descripcion] nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AI NULL,
  [fecha] datetime DEFAULT getdate() NULL
)
ON [PRIMARY]
GO

--
-- Definition for view view1 : 
--
GO
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO

SET IDENTITY_INSERT [dbo].[CategoriasEsta] ON
GO

INSERT INTO [dbo].[CategoriasEsta] ([Id], [CodigoEstadistico], [CategoriaEsta])
VALUES 
  (1, N'0', N'CLASIFICACION EN OPERADOR')
GO

INSERT INTO [dbo].[CategoriasEsta] ([Id], [CodigoEstadistico], [CategoriaEsta])
VALUES 
  (2, N'1', N'RESTO')
GO

SET IDENTITY_INSERT [dbo].[CategoriasEsta] OFF
GO


INSERT INTO [dbo].[confiSer] ([parametro], [valor])
VALUES 
  (N'servidor', N'0')
GO

--
-- Definition for indices : 
--

ALTER TABLE [dbo].[AccionesHoy]
ADD CONSTRAINT [aaaaaAccionesHoy_PK] 
PRIMARY KEY NONCLUSTERED ([Id])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[Candidatos]
ADD CONSTRAINT [aaaaaCandidatos_PK] 
PRIMARY KEY NONCLUSTERED ([Id])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

CREATE NONCLUSTERED INDEX [unico] ON [dbo].[Candidatos]
  ([Nif], [HoraCita])
WITH (
  PAD_INDEX = OFF,
  DROP_EXISTING = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  SORT_IN_TEMPDB = OFF,
  ONLINE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[CategoriasEsta]
ADD CONSTRAINT [aaaaaCategoriasEsta_PK] 
PRIMARY KEY NONCLUSTERED ([Id])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

CREATE UNIQUE NONCLUSTERED INDEX [CodCategoriaEsta] ON [dbo].[CategoriasEsta]
  ([CodigoEstadistico])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  DROP_EXISTING = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  SORT_IN_TEMPDB = OFF,
  ONLINE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[Colas]
ADD CONSTRAINT [aaaaaColas_PK] 
PRIMARY KEY NONCLUSTERED ([Id])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

CREATE UNIQUE NONCLUSTERED INDEX [Cola] ON [dbo].[Colas]
  ([Cola])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  DROP_EXISTING = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  SORT_IN_TEMPDB = OFF,
  ONLINE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[GeneradorCitas]
ADD CONSTRAINT [GeneradorCitas_pk] 
PRIMARY KEY CLUSTERED ([Cola], [HoraInicio], [HoraFin])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[HistoricoAcciones]
ADD CONSTRAINT [PK_HistoricoAcciones] 
PRIMARY KEY NONCLUSTERED ([Id])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[HistoricoCandidatos]
ADD CONSTRAINT [aaaaaHistoricoCandidatos_PK] 
PRIMARY KEY NONCLUSTERED ([Id])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[Huecos]
ADD CONSTRAINT [aaaaaHuecos_PK] 
PRIMARY KEY NONCLUSTERED ([Id])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[mensajesGestores]
ADD PRIMARY KEY CLUSTERED ([Id])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[Operadores]
ADD CONSTRAINT [aaaaaOperadores_PK] 
PRIMARY KEY NONCLUSTERED ([Id])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

CREATE UNIQUE NONCLUSTERED INDEX [codigo] ON [dbo].[Operadores]
  ([codigo])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  DROP_EXISTING = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  SORT_IN_TEMPDB = OFF,
  ONLINE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[RangoHuecos]
ADD UNIQUE NONCLUSTERED ([Origen])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[SalasAtencion]
ADD PRIMARY KEY CLUSTERED ([IdSalaAtencion])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

ALTER TABLE [dbo].[SalasEspera]
ADD PRIMARY KEY CLUSTERED ([IdSalaEspera])
WITH (
  PAD_INDEX = OFF,
  IGNORE_DUP_KEY = OFF,
  STATISTICS_NORECOMPUTE = OFF,
  ALLOW_ROW_LOCKS = ON,
  ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
