For now i have created:ALTER DATABASE TestADD FILEGROUP RESULTSBEFORE2011;GOALTER DATABASE TestADD FILEGROUP Leto2011;GOALTER DATABASE TestADD FILEGROUP Leto2012;GOALTER DATABASE TestADD FILEGROUP Leto2013;GOALTER DATABASE TestADD FILEGROUP Leto2014;GOALTER DATABASE TestADD FILEGROUP Leto2015;
ALTER DATABASE TestADD FILE ( NAME = PredLetom2011, FILENAME = 'C:\Test\PredLetom2011.ndf', FILEGROWTH = 5000MB)TO FILEGROUP RESULTSBEFORE2011;ALTER DATABASE TestADD FILE ( NAME = PodatkiLeto2011, FILENAME = 'C:\Test\PodatkiLeto2011.ndf', FILEGROWTH = 5000MB)TO FILEGROUP Leto2011;ALTER DATABASE TestADD FILE ( NAME = PodatkiLeto2012, FILENAME = 'C:\Test\PodatkiLeto2012.ndf', FILEGROWTH = 5000MB)TO FILEGROUP Leto2012;GOALTER DATABASE TestADD FILE ( NAME = PodatkiLeto2013, FILENAME = 'C:\Test\PodatkiLeto2013.ndf', FILEGROWTH = 5000MB)TO FILEGROUP Leto2013;GOALTER DATABASE Test ADD FILE ( NAME = PodatkiLeto2014, FILENAME = 'C:\Test\PodatkiLeto2014.ndf', FILEGROWTH = 5000MB)TO FILEGROUP Leto2014;GOALTER DATABASE Test ADD FILE ( NAME = PodatkiLeto2015, FILENAME = 'C:\Test\PodatkiLeto2015.ndf', FILEGROWTH = 5000MB)TO FILEGROUP Leto2015;
CREATE PARTITION FUNCTION [RESULTS_PF](datetime) AS RANGE RIGHT FOR VALUES (N'2011-01-01T00:00:00.000', N'2012-01-01T00:00:00.000', N'2013-01-01T00:00:00.000', N'2014-01-01T00:00:00.000', N'2015-01-01T00:00:00.000')GO
CREATE PARTITION SCHEME [RESULTS_PS] AS PARTITION [RESULTS_PF] TO ([RESULTSBEFORE2011], [Leto2011], [Leto2012], [Leto2013], [Leto2014], [Leto2015])GO
Is everthing ok till now?