RudyGroode


Hello,

I have a large database, which needs to be redistributed over several drives.

So I need to redistribute the contents of one large file across about 6 smaller files.

Can anyone gove me any advice on how to achieve this

I would prefer to do it by script, and not use the gui!

Thanks





Re: Need to reorganise database into new files

Arnie Rowland


Actually, this is one of the 'rare' situations where you just might be better off using SSMS/EM.

Change the filegroup for the TABLE properties. Behind the scenes (of the GUI), a new table is created, data is moved, indexes are built, constraints are re-created, then the old table's constraints are removed, the old table is removed, and then the new table is renamed to the old table name.

Quite a bit to be done -and then you wonder if you remembered it all...

You can use Profiler to capture the entire sequence for one table, and then you 'may' be able to use those statements in creating your own scripts. (But again, I don't recommend it.)