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?

animuson
  • 53,861
  • 28
  • 137
  • 147
Caveatrob
  • 12,667
  • 32
  • 107
  • 187

1 Answers1

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:

Community
  • 1
  • 1
gbn
  • 422,506
  • 82
  • 585
  • 676