Moving data by moving partitions

  • Hello, is it efficient to move data from one partitioned table to another by moving a partition?  Can DML activities be going on during this operation?  What are the commands to actually do this in SQLServer 2005.  Thank you.

    David

    Best Regards,

    ~David

  • Yes it is efficient to move data from one partition of TableA to an empty partition on TableB.  Both Partitions must be on the same Filegroup AND the "range" from the Partition from Table A must match or "fit" into the targeted empty partition in TableB.  There are some other restrictions that you may want to look at on BOL.

    ALTER TABLE dbo.TableA SWITCH PARTITION 1 TO dbo.TableB PARTITION 1 ;

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply