CREATE PARTITION FUNCTION [SHIVENDOOPF](DATETIME) AS RANGE LEFT FOR VALUES ( '20151231 23:59:59.997', '20161231 23:59:59.997' ) ALTER DATABASE [TESTDB] ADD FILEGROUP [2015FG1]; ALTER DATABASE [TESTDB] ADD FILEGROUP [2016FG2]; ALTER DATABASE [TESTDB] ADD FILE (NAME = '2015FG1', FILENAME = 'D:\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\2015FG1.NDF') TO FILEGROUP [2015FG1]; ALTER DATABASE [TESTDB] ADD FILE (NAME = '2016FG1', FILENAME = 'D:\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\2016FG1.NDF') TO FILEGROUP [2016FG2]; CREATE PARTITION SCHEME SHIVENDOOPS AS PARTITION SHIVENDOOPF TO ( [2015FG1], [2016FG2], [PRIMARY] ) IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'BaseTable') AND name = N'[PK_BaseTable]') ALTER TABLE BaseTable DROP CONSTRAINT [PK_BaseTable] GO ALTER TABLE dbo.BaseTable ADD CONSTRAINT [PK_BaseTable] PRIMARY KEY CLUSTERED ( [productId],[CreatedOn] ASC ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF,IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON SHIVENDOOPS (CreatedOn)
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE