You have decided to remove or recreate the partitioning. If you try to drop either the partition schema or the function you will get errors like these:

- The partition scheme "XXXXXXXXXXXXX" is currently being used to partition one or more tables.
- Partition function 'YYYYYYY' is being used by one or more partition schemes.

As documented in BOL:

- A partition scheme can be dropped only if there are no tables or indexes using the partition scheme.
- A partition function can be dropped only if there are no partition schemes using the partition function.

So the correct way to drop or rebuild the partitioning is:

1. Remove the partitioning:
2. Drop the current clustered index of the Partitioned Table.
3. Create a new clustered index that will not use the partition scheme.
4. DROP the PARTITION SCHEMA.
5. Then DROP the PARTITION FUNCTION.

This an approach to removing the partitioning.

But what if you only want to recreate it? Then there is a faster approach:

1. Drop the current clustered index of the Partitioned Table.
2. Create the new partition function.
3. Create the new partition scheme with a different name when the old one.
4. Create the new partition function with different name when the old one.
   Take care in this step so that the partition function is also containing the partition scheme name and therefore you need to put here also the name from step 3.
5. Create a new clustered index that will not use the old partition scheme but the new one. Take care that you explicitly need to specify this in the CREATE INDEX command in the on clause.
6. Now you are able to DROP the old PARTITION SCHEMA.
7. Now you are able to DROP the old PARTITION FUNCTION.