Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

InstanceDatabaseFile Class

SQL Server 2005

Represents the file specifications for an instance database file.

Namespace: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

public sealed class InstanceDatabaseFile : NamedSmoObject
public final class InstanceDatabaseFile extends NamedSmoObject
public final class InstanceDatabaseFile extends NamedSmoObject

Each InstanceDatabaseFileGroup can contain one or more InstanceDatabaseFile objects. Each InstanceDatabaseFile contains information about one instance database data file.

If you want to alter the instance database after creating the instance, use the SQL Server tools, such as SQL Server Management Studio.

The following examples show how to define a data file for the instance database:

InstanceDatabaseFileGroup idb_fg = 
    new InstanceDatabaseFileGroup(idb, "PRIMARY");

// Define and add a data file
InstanceDatabaseFile idb_file1 = 
    new InstanceDatabaseFile(idb_fg, "MyInst_PrimaryFile1");
idb_file1.FileName = @"C:\NS\Full\MyInst_PrimaryFile1.mdf";
idb_file1.InitialSize = "5MB";
idb_file1.MaxSize = "15MB";
idb_file1.GrowthIncrement = "10%";

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

Community Additions

© 2015 Microsoft