Share via


Propriété ServiceInstanceId

Obtient la valeur d'ID qui identifie de façon unique l'instance du service pour cette instance de SQL Server.

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 ServiceInstanceId As String
    Get
'Utilisation
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

Valeur de propriété

Type : System. . :: . .String
Valeur In32 qui spécifie la valeur d'ID de l'instance de service pour l'instance de SQL Server.

Exemples

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

Voir aussi

Référence

Planning a SQL Server Installation

Autres ressources