Aracılığıyla paylaş


Server.ServiceAccount Özelliği

sql Server örnek çalıştığı hizmet hesabına alır.

Ad Alanı:  Microsoft.SqlServer.Management.Smo
Derleme:  Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo içinde.dll)

Sözdizimi

'Bildirim
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public ReadOnly Property ServiceAccount As String
    Get
'Kullanım
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

Özellik Değeri

Tür: System.String
A String belirleyen hizmet hesabı örnek için bir değer SQL Server.

Örnekler

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

Ayrıca bkz.

Başvuru

Planning a SQL Server Installation

Diğer Kaynaklar