This may seem like an
unnecessary thing to say, but the user interface implies otherwise, because it uses check
boxes instead of radio buttons, as you can see in Figure 4-3.
Figure 4-3. You can only select one filegroup, so the default column in this interface should
really be a collection of radio buttons.
CHAPTER 4 n BACKING UP AND RESTORING FILES AND FILEGROUPS 80
The default filegroup is associated with a database, so it makes sense that the T-SQL
command to change it is ALTER DATABASE:
ALTER DATABASE AWSample
MODIFY FILEGROUP AWSampleData DEFAULT;
GO
I highly recommend creating at least one extra filegroup other than PRIMARY and
changing it to have the DEFAULT property, as shown in the preceding code example. I also
recommend avoiding the use of the DEFAULT property when creating objects.
Assigning Objects to Filegroups
When you create a table or an index, either you or SQL Server must assign that newly created
object to a filegroup. If you specify a filegroup in your CREATE TABLE or CREATE INDEX
statement, the object will be placed on the filegroup that you specify.
Pages:
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180