Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a large table should have been partitioned in different derives but all of them in one drive (D:\sql\import2006.ndf), (D:\sql\import2007.ndf).how can i move them in to their own drives like data2006,data2007 etc without loosing data.

share|improve this question

migrated from stackoverflow.com Aug 17 '12 at 1:57

This question came from our site for professional and enthusiast programmers.

2 Answers 2

You are using the terminology incorrectly and is not clear what you want to achieve. A table has one or more partitions. Each partition resides in a filegroup. A filegroup hase one or more files. A file is stored on a logical drive. A logical drive can be backed by one or more physical drives.

What is that you want to change?

  • Did you load data in the wrong partition of the table?
  • Did you load the data in an unpartitioned table and now you need it to be partitioned? (This is really the same question as the first one)
  • Did you placed the partition in the wrong filegroup?
  • Did you place one or more filegroup files on the wrong logical drive?
  • Did you place a logical drive on the wrong physical drive?

Each problem has a different solution.

share|improve this answer
all filegroup files are in one partition which is d:sql\data2006 i m trying to put them in to different partitions such as e:sql\data2007,f:\sql\data2008 etc and logical drives.like placing partition wrong drive and wrong file group thanks. –  user1602633 Aug 16 '12 at 9:29
Are you talking about 'partition' as in table partitions or 'partition' as in disk partitions? –  Remus Rusanu Aug 16 '12 at 10:58
To move around the files that compose a database, use the KB224071 as @podiluska linked –  Remus Rusanu Aug 16 '12 at 11:44

You can detach the database, move the files, then reattach


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.