共用方式為


Settings.DefaultLog 屬性

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

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public Property DefaultLog As String 
    Get 
    Set
'用途
Dim instance As Settings 
Dim value As String 

value = instance.DefaultLog

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

屬性值

型別:System.String
A String value that specifies the default log file directory for the instance of SQL Server.

備註

The default log file directory is where the log files are stored on the instance of SQL Server unless otherwise specified in the FileName property. This directory contains the .ldf transaction log files. This is set to C:\Program Files\Microsoft SQL Server\MSSQL10_50\MSSQL\Data by default.

範例

在 SMO 中設定 SQL Server

請參閱

參考

Settings 類別

Microsoft.SqlServer.Management.Smo 命名空間