Condividi tramite


Proprietà Server.ServiceInstanceId

Gets the ID value that uniquely identifies the service instance for this instance of SQL Server.

Spazio dei nomi  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Sintassi

'Dichiarazione
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Expensive Or SfcPropertyFlags.Standalone)> _
Public ReadOnly Property ServiceInstanceId As String 
    Get
'Utilizzo
Dim instance As Server 
Dim value As String 

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

Valore proprietà

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

Esempi

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

Vedere anche

Riferimento

Server Classe

Spazio dei nomi Microsoft.SqlServer.Management.Smo

Planning a SQL Server Installation

Altre risorse

Gestione dei server