Hi!
I have a SQL SERVER 2008 R2 with a datawarehouse db with 200 Gb with 2 partitioned tables with milions of records.
I have scripted this db and created a clean db in our lab env with the same structure but without records.
We want to try to split in our lab before going to production. The details are :
The partions are : P2006, P2007, P2008, P2009, P2010, P2011, P2012, P2013 , P2014
Each partion has 1 year except P2014 with year 2014 and year 2015 records.
The partion function is "as range left".
I need to move out (split) the 2015 records from partion P2014 to a new partion P2015.
What I did is :
ALTER DATABASE MyDB
ADD FILEGROUP FG2015
GO
ALTER DATABASE MyDB
ADD FILE(
NAME = 'MyLogicalFileName',
FILENAME = 'C:\MyPhsyicalFile.ndf',
SIZE = 1.5 GB,
FILEGROWTH = 25%
)
TO FILEGROUP FG2015
GO
ALTER PARTITION SCHEME ps_DataAnual_dim_date_year
NEXT USED [P2015]
GO
ALTER PARTITION FUNCTION pf_DataAnual_dim_date_year
SPLIT RANGE (16436)
(id 16346 correspond to 31-dec-2014)
The content of partion function is :
CREATE PARTITION FUNCTION [pf_DataAnual_dim_date_yea
--GO
The content of partion scheme is :
CREATE PARTITION SCHEME [ps_DataAnual_dim_date_yea
It does not look good. The order has been destroyed, please double check, I'm I missing something ?, Is it by design ?
Regards,Miguel