I created a database TEST contains test.mdf,test_2010.ndf,test_2011.ndf,test_2012.ndf. I should set default for which? why
asked Nov 15, 2012 at 12:47 AM in Default
Typically your default is your main data file (MDF), if you created multiple file groups and assigned your 2010, 2011, and 2012 files to another file group, you would rebuild the clustered index on the filegroup you want the data to exist in. That would partition your data. Not sure what you are trying to accomplish with multiple file groups with year names in them otherwise.
answered Nov 15, 2012 at 01:54 PM
You set the default so that you dont need to specify which file group to create objects on.
With the below it would create a table on the default filegroup, which if it hasnt been changed will be the PRIMARY file group.
CREATE TABLE DefaultFG ( Col1 INT, Col2 INT )
Now the below will create a table on the 2010 file group
Create Table FG2010 ( Col1 INT, Col2 INT ) ON FG2010
answered Nov 15, 2012 at 09:19 AM