Share via


DeployedDac.ServerInstanceName Property

Definition

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

public:
 property System::String ^ ServerInstanceName { System::String ^ get(); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcKey(1)]
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty]
public string ServerInstanceName { get; }
[<Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcKey(1)>]
[<Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty>]
member this.ServerInstanceName : string
Public ReadOnly Property ServerInstanceName As String

Property Value

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.

Attributes

Examples

VC#

System.Console.WriteLine(deployedDac.ServerInstanceName);  

VB

System.Console.WriteLine(deployedDac.ServerInstanceName)  

PowerShell

Write-Host $deployedDac.ServerInstanceName   

Remarks

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.

Applies to