USE [hiscentral_logging] GO BEGIN TRANSACTION CREATE PARTITION FUNCTION [fnStorePartitionQueryTime](datetime) AS RANGE LEFT FOR VALUES (N'2011-10-01T00:00:00') CREATE PARTITION SCHEME [schStorePartitionQueryTime] AS PARTITION [fnStorePartitionQueryTime] TO ([PRIMARY], [RecentData]) CREATE CLUSTERED INDEX [ClusteredIndex_on_schStorePartitionQueryTime_634580928370312500] ON [dbo].[log11Service] ( [querytime] )WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [schStorePartitionQueryTime]([querytime]) DROP INDEX [ClusteredIndex_on_schStorePartitionQueryTime_634580928370312500] ON [dbo].[log11Service] WITH ( ONLINE = OFF ) COMMIT TRANSACTION