Поделиться через


DataFile.IsPrimaryFile Property

Gets the Boolean property value that specifies whether the data file is the primary file of the database.

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

Синтаксис

'Декларация
Public Property IsPrimaryFile As Boolean
public bool IsPrimaryFile { get; set; }
public:
property bool IsPrimaryFile {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_IsPrimaryFile ()

/** @property */
public void set_IsPrimaryFile (boolean value)
public function get IsPrimaryFile () : boolean

public function set IsPrimaryFile (value : boolean)

Значение свойства

A Boolean value that specifies whether the data file is the primary file or a secondary file. If True, the data file the primary file. If False (default), the data file is a secondary file.

Замечания

The primary file has an .mdf file extension and secondary files have an .ndf file extension.

Это пространство имен, класс или элемент поддерживаются только платформой Microsoft .NET Framework версии 2.0.

Пример

How to: Add FileGroups and DataFiles to a Database in Visual Basic .NET

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

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.

См. также

Справочник

DataFile Class
DataFile Members
Microsoft.SqlServer.Management.Smo Namespace

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

Using Filegroups and Files to Store Data
Файлы и файловые группы физической базы данных
CREATE DATABASE (Transact-SQL)