다음을 통해 공유


ServiceInstanceId 속성

이 SQL Server 인스턴스에 대해 서비스 인스턴스를 고유하게 식별하는 ID 값을 가져옵니다.

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)

구문

‘선언
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public ReadOnly Property ServiceInstanceId As String
    Get
‘사용 방법
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

속성 값

유형: System. . :: . .String
SQL Server 인스턴스의 서비스 인스턴스 ID 값을 지정하는 In32 값입니다.

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

참고 항목

참조

Planning a SQL Server Installation

관련 자료