次の方法で共有


Server.BrowserServiceAccount プロパティ

SQL Server のインスタンスで Browser サービスを実行しているサービス アカウントを取得します。

名前空間:  Microsoft.SqlServer.Management.Smo
アセンブリ:  Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)

構文

'宣言
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Expensive Or SfcPropertyFlags.Standalone)> _
Public ReadOnly Property BrowserServiceAccount As String 
    Get
'使用
Dim instance As Server 
Dim value As String 

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

プロパティ値

型: System.String
SQL Server のインスタンスの SQL Server Browser サービス アカウントを示す String オブジェクトです。

説明

SQL Server Browser は、クライアント コンピューターに SQL Server 接続情報を提供します。SQL Server Browser は複数の SQL Server インスタンスと Integration Services インスタンスで共有されます。

使用例

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

関連項目

参照

Server クラス

Microsoft.SqlServer.Management.Smo 名前空間

その他の技術情報

コレクションの使用

サーバーの管理