InstanceDatabaseLogFile Constructor (InstanceDatabaseOptions, String)
Initializes a new instance of the InstanceDatabaseLogFile class with a parent InstanceDatabaseOptions object and a name.
Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntaxe
'Déclaration
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
)
Paramètres
- 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.
Notes
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.
Exemple
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)
Plateformes
Plateformes de développement
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Plateformes cibles
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Voir aussi
Référence
InstanceDatabaseLogFile Class
InstanceDatabaseLogFile Members
Microsoft.SqlServer.Management.Nmo Namespace
Autres ressources
CREATE DATABASE (Transact-SQL)
Définition de la base de données d'instance
LogFile Element (ICF)