Friday, March 30, 2012

Problems with Switching partitions

Hi,

Im trying to switch a partition from partitioned table to a non partitioned table. I am getting the following error.

eCertified.dbo.Carrier_Trip_AvailabilitySwitch.PK_Carrier_Trip_AvailabilitySwitch_1' is in filegroup 'PRIMARY' and partition 24 of index 'eCertified.dbo.Carrier_Trip_Availability_Partition.PK_Carrier_Trip_Availability_Partition' is in filegroup 'SECONDARY24'. [SQLSTATE 42000] (Error 4939). The step failed.

The table one has 24 partitions and it has a partitioned clustered index. PK_Carrier_Trip_AvailabilitySwitch is the primary key in the non partitioned table and its is in the primary file group while the PK_Carrier_Trip_Availability_Partition is the primary key iin the partitioned table and its in the file group secondary 24.

Please let me know how to solve this issue.

When you switch a partition of a partitioned table to a non-partitioned table or a partition of another partitioned table, the source partition and the target table/partition must be in the same file group.

No comments:

Post a Comment