Condividi tramite


InstanceDatabaseLogFile Constructor (InstanceDatabaseOptions, String)

Initializes a new instance of the InstanceDatabaseLogFile class with a parent InstanceDatabaseOptions object and a name.

Spazio dei nomi: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Sintassi

'Dichiarazione
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
)

Parametri

  • 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.

Osservazioni

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.

Esempio

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)

Piattaforme

Piattaforme di sviluppo

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Piattaforme di destinazione

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Vedere anche

Riferimento

InstanceDatabaseLogFile Class
InstanceDatabaseLogFile Members
Microsoft.SqlServer.Management.Nmo Namespace

Altre risorse

CREATE DATABASE (Transact-SQL)
Definizione del database dell'istanza
LogFile Element (ICF)