Changing filegroup

  • I have one data file which is associated with the PRIMARY Filegroup. I created another filegroup named 'USER_DATA', created secondary file associated with the USER_DATA filegroup. My problem is I want to move the original data file from PRIMARY to USER_DATA? Is it possible?

  • Yes. Go into the design of the table you want to move, select the properties and change the table filegroup.

  • Is there any other way that I can just point the whole database data to the new filegroup?

  • I wrote a script that would move one table at a time to a new filegroup. You can use it and loop over all tables on your database, and move them all. The script is available on

    http://education.sqlfarms.com/ShowPost.aspx?PostID=59

    -------------------------

    Omri Bahat

    SQL Farms Solutions

    http://www.sqlfarms.com

    Editor's Note: : Dr. Omri Bahat works for SQLFarms, a software vendor of SQL Server tools.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply