Partilhar via


Propriedade do RDL Server.ServiceAccount

Gets the service account under which the instance of SQL Server is running.

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

Sintaxe

'Declaração
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public ReadOnly Property ServiceAccount As String 
    Get
'Uso
Dim instance As Server 
Dim value As String 

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

Valor da propriedade

Tipo: System.String
A String value that specifies service account for the instance of SQL Server.

Exemplos

C#

Server srv = new Server("(local)");
Console.WriteLine("The SQL Server service account is:" + srv.ServiceAccount);

PowerShell

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

Consulte também

Referência

Server Classe

Namespace Microsoft.SqlServer.Management.Smo

Planning a SQL Server Installation

Outros recursos

Gerenciando servidores