ApplicationDatabaseLogFile Class

Defines an application database log file.

Пространство имен: Microsoft.SqlServer.Management.Nmo
Сборка: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Синтаксис

'Декларация
Public NotInheritable Class ApplicationDatabaseLogFile
    Inherits NamedSmoObject
public sealed class ApplicationDatabaseLogFile : NamedSmoObject
public ref class ApplicationDatabaseLogFile sealed : public NamedSmoObject
public final class ApplicationDatabaseLogFile extends NamedSmoObject
public final class ApplicationDatabaseLogFile extends NamedSmoObject

Замечания

Each application database can have 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 application database after creating the application, 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.ApplicationDatabaseLogFile

Пример

The following examples show how to define a log file for the application database:

ApplicationDatabaseLogFile adb_log = 
    new ApplicationDatabaseLogFile(adb, "MyApp_LogFile1");
adb_log.FileName = @"C:\NS\Full\MyApp_LogFile1.ldf";
adb_log.InitialSize = "5MB";
adb_log.MaxSize = "20MB";
adb_log.GrowthIncrement = "10%";
adb.ApplicationDatabaseLogFiles.Add(adb_log);
Dim adb_log As ApplicationDatabaseLogFile = _
    New ApplicationDatabaseLogFile(adb, "MyApp_LogFile1")
adb_log.FileName = "C:\NS\Full\MyApp_LogFile1.ldf"
adb_log.InitialSize = "5MB"
adb_log.MaxSize = "20MB"
adb_log.GrowthIncrement = "10%"
adb.ApplicationDatabaseLogFiles.Add(adb_log)

Синхронизация потоков

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.

Платформы

Платформы разработки

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

Целевые платформы

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

См. также

Справочник

ApplicationDatabaseLogFile Members
Microsoft.SqlServer.Management.Nmo Namespace

Другие ресурсы

CREATE DATABASE (Transact-SQL)
Определение базы данных приложений
LogFile Element (ADF)