0

My predecessor for some reason split the data between two filegroups in our SQL Server 2005 database.

I'm thinking about just putting everything in one.

Any speculation on why someone would split things between filegroups with two files on the same server?

How do I put all of the objects in a single group?

1 Answer 1

3

You'd split for several reasons:

  • partitioning
  • index/data separation
  • more disks (especially with SAN)
  • read only filegroup for static data
  • filegroups for BLOB/FILESTREAM
  • ...

Anyway, to move tables you'd ALTER the clustered index which moves the data.

When you script tables/indexes, you see CREATE INDEX (--- ) ON [PRIMARY] where PRIMARY is a filegroup, also in the CREATE TABLE for clustered indexes

Other SO answers from me on filegroups:

Sign up to request clarification or add additional context in comments.

3 Comments

Is it worth splitting them if they're going to be on the same physical drive?
@Caveatrob: no, see my "Multiple Data files and Multiple File Groups" link
@Caveatrob one of such reason is performance profiling (you are collecting information how your app operations load the drive)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.