Поделиться через


Свойство DeployedDac.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 

См. также

Справочник

DeployedDac Класс

Пространство имен Microsoft.SqlServer.Management.Utility