Wednesday, March 28, 2012

Max files in filegroup

Hi,
I read somewhere that you can have max 16 files in a filegroup and still be
able to detach/reattach.
Can I have several filegroups with max 16 files each and still be able to
detach/retach?
I am quite new with working with large databases. Currently I have fixed
sized datafile of 4.5GB each, enough to fit on DVD.
However, my database is growing fast and I need to create more datafiles and
still be able to detach/retach database.
Any clear insight on this would be appreciated
Thanks in advance
Christian
> I read somewhere that you can have max 16 files in a filegroup and still
be
> able to detach/reattach.
> Can I have several filegroups with max 16 files each and still be able to
> detach/retach?
I believe you can have up to 256 files per filegroup and up to 256
filegroups per database in SQL 2000. However, if you need to attach a
database with more than 16 files, you need to use CREATE DATABASE ... FOR
ATTACH instead of sp_attach_db. The sp_attach_db proc is basically just a
convenience wrapper for CREATE DATABASE ... FOR ATTACH but is limited to 16
files.
Hope this helps.
Dan Guzman
SQL Server MVP
"Christian Perthen" <enough@.onegrantforeachkilledspammer.com> wrote in
message news:OV%23Hb7DHEHA.2744@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I read somewhere that you can have max 16 files in a filegroup and still
be
> able to detach/reattach.
> Can I have several filegroups with max 16 files each and still be able to
> detach/retach?
> I am quite new with working with large databases. Currently I have fixed
> sized datafile of 4.5GB each, enough to fit on DVD.
> However, my database is growing fast and I need to create more datafiles
and
> still be able to detach/retach database.
> Any clear insight on this would be appreciated
> Thanks in advance
> Christian
>

No comments:

Post a Comment