Remarque
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Gets the service account under which the instance of SQL Server is running.
Espace de noms : Microsoft.SqlServer.Management.Smo
Assembly : Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)
Syntaxe
'Déclaration
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public ReadOnly Property ServiceAccount As String
Get
'Utilisation
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
Valeur de propriété
Type : System.String
A String value that specifies service account for the instance of SQL Server.
Exemples
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
Voir aussi
Référence
Espace de noms Microsoft.SqlServer.Management.Smo
Planning a SQL Server Installation