October 30, 2001 at 9:26 pm
I would like to merge two datafiles, but they are in different filegroups.
Would you know how to merge two datafiles from different filegroups.
I could use DBCC SHRINKFILE then ALTER DATABASE, but this can only work if the files are in the same filegroup or I can move the tables by creating a clustered index on the table which is on the primary filegroup or simple create a new table, insert the data into it, drop the old table and rename tha new table.
Do you know how to move a datafile to a new filegroup, eg move the Application datafile to the Primary filegroup or some other way of merging datafiles in different filegroups.
Thanks in advance
October 31, 2001 at 4:03 am
Take a look at the EMPTYFILE option for ShrinkFile. I think that is the right way to get the data out without resorting to things like changing your clustered key.
Andy
October 31, 2001 at 10:40 am
If you create the clustered key using the new
filegroup, the data will move. You can then drop the clustered key if you want (not recommended.
Steve Jones
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply