Alters a partition function by splitting or merging its boundary values. Before SQL Server 2012 number of partitions was limited to 1,000. Split the new RANGE with SPLIT command with ALTER PARTITION FUNCTION to expand partition function with the new boundary. When users are adding a new partition range, data movement will occur If rows of that range contain in another partition ranges. Below T-SQL statement will return the list of partition range for the table. You will need to drop or disable the columnstore index before performing this operation. Partitioning information. SELECT OBJECT_SCHEMA_NAME(pstats.object_id) AS SchemaName ,OBJECT_NAME(pstats.object_id) AS TableName ,ps.name AS PartitionSchemeName ,ds.name AS PartitionFilegroupName ,pf.name AS PartitionFunctionName ,CASE pf.boundary_value_on_right WHEN 0 THEN 'Range Left' ELSE 'Range Right' END AS PartitionFunctionRange ,CASE pf.boundary_value_on_right WHEN 0 THEN 'Upper Boundary' ELSE 'Lower Boundary' END AS PartitionBoundary ,prv.value AS PartitionBoundaryValue … Split SQL Server table partition is utilized to integrate a new partition range to extend the existing partition function. RANGE (boundary_value) must be an existing boundary value, of the partition to be dropped. CREATE PARTITION FUNCTION [pf_thousand] (int) AS RANGE left FOR VALUES (10000, 20000, 30000); GO IF EXISTS ( SELECT * FROM sys . Running an ALTER PARTITION FUNCTION statement can split one table partition or index that uses the partition function into two partitions. CREATE PARTITION FUNCTION myDateRangePF (datetime) AS RANGE RIGHT FOR VALUES ('20110101', '20120101','20130101') GO CREATE PARTITION SCHEME myPartitionScheme AS PARTITION myDateRangePF ALL TO ([PRIMARY]) GO SELECT ps.name,pf.name,boundary_id,value FROM sys.partition_schemes ps INNER JOIN sys.partition_functions pf ON pf.function_id=ps.function_id … ALTER DATABASE AutoPartition ADD FILEGROUP FG_04_2020; SELECT FILEGROUP_NAME(data_space_id) AS FileGroup, *. So we have created a new secondary file group and we have altered the partition scheme to use new secondary file group named as PartitionFG2. Row reallocation to the newly added partition range. Is the name of the partition function to be modified. Drop and rebuild an existing partitioned index by using the Transact-SQL CREATE INDEX statement with the DROP EXISTING = ON clause. Only use ALTER PARTITION FUNCTION for splitting one partition into two, or merging two partitions into one. And, the partition sc… The merged partition exists in the filegroup that didn't hold boundary_value at first. Otherwise, the ALTER PARTITION FUNCTION statement fails with an error that displays the partition scheme or schemes that lack a NEXT USED filegroup. More than one table or index can use the same partition function. A partition function can participate in more than one partition scheme. Let’s have a real-time example with the sample partition over the table. Changes to a partition function in the publication database must be manually applied in the subscription database. Before splitting the partition range with the new value, Users have to assign the next usable filegroup to the partition scheme. CONTROL SERVER or ALTER ANY DATABASE permission on the server of the database in which the partition function was created. Brent Ozar Unlimited has some good resources on SQL Server Table Partitioning. If you create all the partitions in the same filegroup, that filegroup is initially assigned to be the NEXT USED filegroup automatically. Here are the highlights: The actions performed by a SPLIT of a RANGE LEFT partition function: Identify existing partition to be split, which is the one that contains the new boundary (or the last partition if no existing boundaries are higher than the one being added) If you have a partitioned table or index in SQL Server, but you need more partitions, you can add a partition to the partition function using the ALTER PARTITION FUNCTION statement with the SPLIT RANGE argument. To view Transact-SQL syntax for SQL Server 2014 and earlier, see Previous versions documentation.