InstanceDatabaseFile Class
Represents the file specifications for an instance database file.
命名空间: Microsoft.SqlServer.Management.Nmo
程序集: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
语法
声明
Public NotInheritable Class InstanceDatabaseFile
Inherits NamedSmoObject
public sealed class InstanceDatabaseFile : NamedSmoObject
public ref class InstanceDatabaseFile sealed : public 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.
Inheritance Hierarchy
System.Object
Microsoft.SqlServer.Management.Smo.SmoObjectBase
Microsoft.SqlServer.Management.Smo.SqlSmoObject
Microsoft.SqlServer.Management.Smo.NamedSmoObject
Microsoft.SqlServer.Management.Nmo.InstanceDatabaseFile
示例
The following examples show how to define a data file for the instance database:
InstanceDatabaseFileGroup idb_fg =
new InstanceDatabaseFileGroup(idb, "PRIMARY");
idb.InstanceDatabaseFileGroups.Add(idb_fg);
// 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%";
idb_fg.InstanceDatabaseFiles.Add(idb_file1);
' Define and add a filegroup
Dim idb_fg As InstanceDatabaseFileGroup = _
New InstanceDatabaseFileGroup(idb, "PRIMARY")
idb.InstanceDatabaseFileGroups.Add(idb_fg)
' Define and add a data file
Dim idb_file1 As InstanceDatabaseFile = _
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%"
idb_fg.InstanceDatabaseFiles.Add(idb_file1)
线程安全
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.
平台
开发平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
目标平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
请参阅
参考
InstanceDatabaseFile Members
Microsoft.SqlServer.Management.Nmo Namespace