Aracılığıyla paylaş


Server.ServiceInstanceId Özelliği

Hizmet örnek için sql Server'ın bu örneğinin benzersiz olarak tanımlayan kimlik değeri 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 ServiceInstanceId As String
    Get
'Kullanım
Dim instance As Server
Dim value As String

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

Özellik Değeri

Tür: System.String
A In32 Değer örnek için hizmet örnek kimliği değerini belirtir SQL Server.

Örnekler

C#

Server srv = new Server("(local)");
Console.WriteLine("The service instance ID is: " + srv.ServiceInstanceId);

PowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
Write-Host "The service instance ID is:" $srv.ServiceInstanceId

Ayrıca bkz.

Başvuru

Planning a SQL Server Installation

Diğer Kaynaklar