Q
Problem solve Get help with specific problems with your technologies, process and projects.

Moving objects to the correct filegroup

I have a SQL Server 7.0 database that was designed by the vendor to have objects be on designated filegroups. Unfortunately when moving data from our QA environment we used DTS, and now everything is on the primary filegroup. A number of vendor utilities and migration are impacted by this, otherwise the application is running fine. What is the best way to move objects to the correct filegroups?

The easiest way to move a table is recreate the clustered index specifying the new filegroup as the location for the clustered index. As the leaf pages of the clustered index are the actual data pages this will move all the table's data to the new filegroup. If the table doesn't contain a clustered index you can create and drop on simply for the purpose of moving the data. To move non-clustered indexes simply recreate them specifying the new filegroup as the location to create them on.

 

For More Information

This was last published in July 2002

Dig Deeper on Microsoft SQL Server Installation

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close