Partager via


Propriété Settings.DefaultFile

Gets or sets the default data file directory for the instance of Microsoft SQL Server.

Espace de noms :  Microsoft.SqlServer.Management.Smo
Assembly :  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Syntaxe

'Déclaration
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public Property DefaultFile As String 
    Get 
    Set
'Utilisation
Dim instance As Settings 
Dim value As String 

value = instance.DefaultFile

instance.DefaultFile = value
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public string DefaultFile { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property String^ DefaultFile {
    String^ get ();
    void set (String^ value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member DefaultFile : string with get, set
function get DefaultFile () : String 
function set DefaultFile (value : String)

Valeur de propriété

Type : System.String
A String value that specifies the default data file directory for the instance of SQL Server.

Notes

The default data file is where the data files are stored on the instance of SQL Server unless otherwise specified in the FileName property. This directory contains the .mdf primary data files and the .ndf secondary data files. This is set to C:\Program Files\Microsoft SQL Server\MSSQL110\MSSQL\Data by default.

Exemples

Configuration de SQL Server dans SMO

Voir aussi

Référence

Settings Classe

Espace de noms Microsoft.SqlServer.Management.Smo