Thursday, February 16, 2012

about partition copy

hello,

I want to copy all or part data in one partition to another partition,how can I do?

do you mean a partitioned table partition? If so search out Kimberley Tripp's whitepaper on partitioning and read the sliding window scenario part. It's very easy at meta data level to move from one table to another.

|||

thank you for your answer, there have some difficulties,The database have hundred of partitioned tables,and have many relations,My purpose is to backup,export,import,copy some partition. How to do this efficienly,transationly?

|||

Your question is very general. Let me try to answer them here

(1) backup: lowest granularity is filegroup. There is no backup functionality at partition level. You can ofcourse create one dedicated filegroup for each partition to acchive it but it may not what you want to do

(2) You can always export using BCP all the rows in a specific partition.

(3) I believe BCP in also works on paritioned table.

|||thank you for your answer, (2)(3) will help me.

No comments:

Post a Comment