InstanceDatabaseLogFile Class
Defines an instance database log file.
Namespace: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
Public NotInheritable Class InstanceDatabaseLogFile
Inherits NamedSmoObject
public sealed class InstanceDatabaseLogFile : NamedSmoObject
public ref class InstanceDatabaseLogFile sealed : public NamedSmoObject
public final class InstanceDatabaseLogFile extends NamedSmoObject
public final class InstanceDatabaseLogFile extends NamedSmoObject
Hinweise
Each instance database can has one or more log files. You can define zero or more log files; if you do not define a log file, Notification Services uses Microsoft SQL Server default settings and creates a single log file that is 25 percent of the sum of the all the database's data files' sizes or 512 KB, whichever is larger.
For more information about defining log files, see CREATE DATABASE (Transact-SQL).
If you want to alter the instance database after creating the instance, use the Microsoft 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.InstanceDatabaseLogFile
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)
Threadsicherheit
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.
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 Members
Microsoft.SqlServer.Management.Nmo Namespace
Andere Ressourcen
CREATE DATABASE (Transact-SQL)
Definieren der Instanzdatenbank
LogFile Element (ICF)