Udostępnij przez


Właściwość DeployedDac.ServerInstanceName

Pobiera nazwę wystąpienie SQL Server o pakiet DAC został wdrożony w postaci ServerName\InstanceName.

Przestrzeń nazw:  Microsoft.SqlServer.Management.Utility
Zestaw:  Microsoft.SqlServer.Management.Utility (w Microsoft.SqlServer.Management.Utility.dll)

Składnia

'Deklaracja
<SfcKeyAttribute()> _
<SfcPropertyAttribute> _
Public ReadOnly Property ServerInstanceName As String
    Get
'Użycie
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

Wartość właściwości

Typ: System.String
A String wartość, która określa nazwę SQL Server wystąpienie uruchomionego na komputerze, na którym pakiet DAC został wdrożony w postaci ServerName\InstanceName.

Uwagi

Więcej niż jeden pakiet DAC mogą być rozmieszczone na wystąpienie SQL Server, i może być więcej niż jedno wystąpienie SQL Server uruchomiony na komputerze.

Przykłady

VC #

System.Console.WriteLine(deployedDac.ServerInstanceName);

VB

System.Console.WriteLine(deployedDac.ServerInstanceName)

PowerShell

Write-Host $deployedDac.ServerInstanceName