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


Свойство DataFile.IsPrimaryFile

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 (в Microsoft.SqlServer.Smo.dll)

Синтаксис

'Декларация
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.ReadOnlyAfterCreation Or SfcPropertyFlags.Standalone)> _
Public Property IsPrimaryFile As Boolean 
    Get 
    Set
'Применение
Dim instance As DataFile 
Dim value As Boolean 

value = instance.IsPrimaryFile

instance.IsPrimaryFile = value
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone)]
public bool IsPrimaryFile { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::ReadOnlyAfterCreation|SfcPropertyFlags::Standalone)]
public:
property bool IsPrimaryFile {
    bool get ();
    void set (bool value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone)>]
member IsPrimaryFile : bool with get, set
function get IsPrimaryFile () : boolean 
function set IsPrimaryFile (value : boolean)

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

Тип: System.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. Otherwise, False (default).

Замечания

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

Примеры

Использование файловых групп и файлов для хранения данных

См. также

Справочник

DataFile Класс

Пространство имен Microsoft.SqlServer.Management.Smo

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

Архитектура файлов и файловых групп

CREATE DATABASE (Transact-SQL)