Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
dturner
Starting Member
24 Posts |
Posted - 2007-01-02 : 13:58:11
|
I have a database with split .mdf files. As it grew, the previous admin split the database files between two drives. I now have to move it to a new, third drive and would like to re-integrate them into one. Is there anyone who knows the best way to do this?The world has more information to offer than I can hold in my headSo I have the followingP:\data\myfile1_Data.MDFS:\data\myfile2_Data.mdfI want to move both file into one to my new SANF:\data\myfile_Data.MDF |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-01-02 : 14:49:55
|
You would use detach/attach method to move the data files to the new server. You'd then need to move the data around by recreating the tables on the primary filegroup.Tara Kizer |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2007-02-09 : 18:12:12
|
2 mdf files? or a typo? anyways here's how i do it...restore the backup in another database - option A (lots of work but i prefer this)or perform directly on the actual db - option Bcheck which tables/objects are on the ndf, if objects just recreate on the primaryif tables, create or recreate a clustered index on the primary, this moves the table to the primary (mdf)... check if the other objects like non-clustered indexes, etc, were moved as well... otherwise just re-createthen remove the ndf... check bol for alter database on removing filesthen make a backup and restore on actual database if you did it with option A--------------------keeping it simple... |
|
|
|
|
|