Bloqueando os Ba�s de Duppers
Execute esse c�digo no SQL Query Analizer uma vez na semana por garantia.
Selecione a DB MuOnline
copie e cole o C�digo:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[trg_CheckSameID]') and OBJECTPROPERTY(id, N'IsTrigger') = 1) drop trigger [dbo].[trg_CheckSameID] GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AllItemsLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[AllItemsLog] GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CopyLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[CopyLog] GO CREATE TABLE [dbo].[AllItemsLog] ( [items_id] [int] IDENTITY (1, 1) NOT NULL , [items_type] [binary] (1) NOT NULL , [items_serial] [binary] (4) NOT NULL , [items_acid] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[CopyLog] ( [copy_id] [int] IDENTITY (1, 1) NOT NULL , [copy_acid] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL , [copy_whdata] [binary] (1200) NOT NULL , [copy_date] [datetime] NOT NULL ) ON [PRIMARY] GO ALTER TABLE [dbo].[AllItemsLog] ADD CONSTRAINT [DF_CT_ITEM_item] DEFAULT (0) FOR [items_type], CONSTRAINT [DF_CT_ITEM_itemid] DEFAULT (0) FOR [items_serial], CONSTRAINT [DF_CT_ITEM_itemrole] DEFAULT ('\') FOR [items_acid] GO CREATE INDEX [IX_CT_ITEM] ON [dbo].[AllItemsLog]([items_type], [items_serial]) ON [PRIMARY] GO ALTER TABLE [dbo].[CopyLog] ADD CONSTRAINT [DF_CopyLog_copy_date] DEFAULT (getdate()) FOR [copy_date] GO SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO
sexta-feira, 1 de abril de 2011
Assinar:
Postar comentários (Atom)
0 comentários:
Postar um comentário