I created a partition function and scheme for a table with 3million lines.
CREATE PARTITION FUNCTION PartFunc (int) AS RANGE RIGHT FOR VALUES (1, 100,300);
CREATE PARTITION SCHEME PartFuncScheme AS PARTITION PartFunc ALL TO PRIMARY;
later, in search for better perf, I splitted with:
ALTER PARTITION FUNCTION PartFunc () SPLIT RANGE (200);
The above query was accepted, but when I tried to split further :
ALTER PARTITION FUNCTION PartFunc () SPLIT RANGE (250);
I got the error msg:
The partition scheme '' does not have any next used filegroup. Partition scheme has not been changed.
Bewildered by the message, I then tried to unpartition by rebuiding the clustered index (col1) of the table, by directly erasing it :
CREATE CLUSTERED INDEX [col1]
ON [dbo].[PartitionTable1]([col1])
WITH (DROP_EXISTING = ON)
ON [PRIMARY];
then within SMSS , Properties/Storage pane of the table displays that the it is not partitioned. However when I tried to drop the partition scheme, it was denied with a message saying the scheme is either non existent or being used on a table. Within SMSS, the partition scheme and the partition function are still displayed as icons, and their properties indicates that they have the table as dependencies.
What's wrong?