If you’re getting error 4939 while trying to switch a partition in SQL Server, it’s probably because you’re trying to switch to a partition that uses a different filegroup.
One of the requirements of switching partitions is that both the source table or partition, and the target table or partition, must be located in the same filegroup.