InstanceDatabaseLogFile Constructor (InstanceDatabaseOptions, String)
Initializes a new instance of the InstanceDatabaseLogFile class with a parent InstanceDatabaseOptions object and a name.
Namespace: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
Public Sub New ( _
instanceDatabaseOptions As InstanceDatabaseOptions, _
name As String _
)
public InstanceDatabaseLogFile (
InstanceDatabaseOptions instanceDatabaseOptions,
string name
)
public:
InstanceDatabaseLogFile (
InstanceDatabaseOptions^ instanceDatabaseOptions,
String^ name
)
public InstanceDatabaseLogFile (
InstanceDatabaseOptions instanceDatabaseOptions,
String name
)
public function InstanceDatabaseLogFile (
instanceDatabaseOptions : InstanceDatabaseOptions,
name : String
)
Parameter
- instanceDatabaseOptions
The InstanceDatabaseOptions object for the instance database.
name
A String, up to 128 characters in length, specifying the logical name of the log file.You cannot change the name. To alter an instance database after creating the instance, use the Microsoft SQL Server tools, such as SQL Server Management Studio.
Hinweise
The logical name is used to refer to log file during any log management tasks. For more information, see the logical_file_name parameter in the CREATE DATABASE (Transact-SQL) topic.
Beispiel
The following examples show how to define a log file for an instance database:
InstanceDatabaseLogFile idb_log =
new InstanceDatabaseLogFile(idb, "MyInst_LogFile1");
idb_log.FileName = @"C:\NS\Full\MyInst_LogFile1.ldf";
idb_log.InitialSize = "3MB";
idb_log.MaxSize = "10MB";
idb_log.GrowthIncrement = "10%";
idb.InstanceDatabaseLogFiles.Add(idb_log);
Dim idb_log As InstanceDatabaseLogFile = _
New InstanceDatabaseLogFile(idb, "MyInst_LogFile1")
idb_log.FileName = "C:\NS\Full\MyInst_LogFile1.ldf"
idb_log.InitialSize = "3MB"
idb_log.MaxSize = "10MB"
idb_log.GrowthIncrement = "10%"
idb.InstanceDatabaseLogFiles.Add(idb_log)
Plattformen
Entwicklungsplattformen
Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.
Zielplattforme
Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.
Siehe auch
Verweis
InstanceDatabaseLogFile Class
InstanceDatabaseLogFile Members
Microsoft.SqlServer.Management.Nmo Namespace
Andere Ressourcen
CREATE DATABASE (Transact-SQL)
Definieren der Instanzdatenbank
LogFile Element (ICF)