Results 1 to 3 of 3

Thread: FileGroup

  1. #1
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250

    Unanswered: FileGroup

    i understand that the filegroup for a table can be specified in the CREATE Table statement. just out of curiosity, is there any way to move a table to a different filegroup, that too, if the table contains data.
    Cheers....

    baburajv

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by baburajv
    i understand that the filegroup for a table can be specified in the CREATE Table statement. just out of curiosity, is there any way to move a table to a different filegroup, that too, if the table contains data.
    The only way that I know how to do this is to create a new table, move the data from your existing table to the new table, drop the old table and then rename the new table.

    Regards,

    hmscott
    Have you hugged your backup today?

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Create (or recreate) a clustered index on the new filegroup. Once you've done that, recreate any indicies for that table on the new filegroup too. If you've created a clustered index where none existed (just to move the data), you should then drop that index.

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •