Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
IsPrimaryFile Property

DataFile.IsPrimaryFile Property

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

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.Matrix)]
public bool IsPrimaryFile { get; set; }

Property Value

Type: 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.

Community Additions

ADD
Show:
© 2015 Microsoft