다음을 통해 공유


ServerInstanceName 속성

Gets the name of the instance of SQL Server on which the DAC package has been deployed in the form of ServerName\InstanceName.

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

구문

‘선언
<SfcKeyAttribute()> _
<SfcPropertyAttribute> _
Public ReadOnly Property ServerInstanceName As String
    Get
‘사용 방법
Dim instance As DeployedDac
Dim value As String

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

속성 값

유형: System. . :: . .String
A String value that specifies the name of the SQL Server instance running on the computer on which the DAC package has been deployed in the form of ServerName\InstanceName.

주의

More than one DAC package can be deployed on the instance of SQL Server, and there can be more than one instance of SQL Server running on the computer.

VC#

System.Console.WriteLine(deployedDac.ServerInstanceName);

VB

System.Console.WriteLine(deployedDac.ServerInstanceName)

PowerShell

Write-Host $deployedDac.ServerInstanceName