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.
2 Answers
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.
-
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.– user1602633Aug 16, 2012 at 9:29
-
1Are you talking about 'partition' as in table partitions or 'partition' as in disk partitions? Aug 16, 2012 at 10:58
-
To move around the files that compose a database, use the KB224071 as @podiluska linked Aug 16, 2012 at 11:44
You can detach the database, move the files, then reattach