BrowserServiceAccount 属性

获取在 SQL Server 的实例上用来运行 Browser 服务的服务帐户。

命名空间:  Microsoft.SqlServer.Management.Smo
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public ReadOnly Property BrowserServiceAccount As String
    Get
用法
Dim instance As Server
Dim value As String

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

属性值

类型:System. . :: . .String
一个 String 对象,该对象指定 SQL Server 的实例上的 SQL Server Browser 服务帐户。

注释

SQL Server Browser provides SQL Server connection information to client computers and is shared across multiple SQL Server and Integration Services instances.

示例

C#

Server srv = new Server("(local)");
Console.WriteLine("The browser service account is " + srv.BrowserServiceAccount);

PowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
Write-Host "The browser service account is" $srv.BrowserServiceAccount