To my knowing there is no other alternative. If you are going to move terabytes of data, you will need some patience.
Why do you want to move data from F2 to F3 in the first place?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I have database of size 5TB. There is a File group (FG1) created and in it, there are two files (F1 and F2) used for user tables (When tables are created they use the files to load the data).
Now, I want to create F3 and migrate all the data from F2 to F3. My question is what is the best way to do it?
So far I tried Shrinkfile with EmptyFile argument and that took way longer as the data to be moved is huge.
Please suggest a better, efficient way to do this.
Thanks
To my knowing there is no other alternative. If you are going to move terabytes of data, you will need some patience.
Why do you want to move data from F2 to F3 in the first place?
Hi,@Kman
Welcome to Microsoft T-SQL Q&A Forum!
Have you tried to use auxiliary file groups? The general process is as follows:
But you need to pay attention to a problem . If there are empty files in the file group , if you directly migrate the data to other files , there will be some files that cannot be emptied . Although the MS document mentioned that it has no effect , I believe it's only a matter of time before encountering this kind of problem.
Please refer to this document.
Best regards,
Bert Zhou
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.