Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DeployedDac.ServerInstanceName Property

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

Namespace:  Microsoft.SqlServer.Management.Utility
Assembly:  Microsoft.SqlServer.Management.Utility (in Microsoft.SqlServer.Management.Utility.dll)
[SfcKeyAttribute()]
[SfcPropertyAttribute]
public string ServerInstanceName { get; }

Property Value

Type: 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 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.