FileGroup Object (SQL-DMO)

The FileGroup object exposes the attributes of a Microsoft® SQL Server™ filegroup.

Remarks

A SQL Server filegroup categorizes the operating system files containing data from a single SQL Server database to simplify database administration tasks, such as backup. A filegroup is a property of a SQL Server database and cannot contain the operating system files of more than one database, though a single database can contain more than one filegroup.

When a database is created, it is created on exactly one filegroup named PRIMARY. After database creation, filegroups can be added to the database. A filegroup name can be specified in a CREATE TABLE or CREATE INDEX statement, directing data storage for a database.

With the FileGroup object, you can:

The Name property of a FileGroup object uses the SQL Server data type sysname. The Name property must be unique within the list of filegroups of a SQL Server database.

To create a SQL Server filegroup

  1. Create a FileGroup object.
  2. Set the Name property.
  3. Add the FileGroup object to the FileGroups collection of a connected Database object.
Methods
CheckFilegroup Method EnumObjects Method
CheckFilegroupDataOnly Method Remove Method (Objects)
EnumFiles Method (FileGroup)  

Properties
Default Property (FileGroup) ReadOnly Property
ID Property Size Property
Name Property  

See Also
CREATE INDEX CREATE TABLE

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.