DeployedDac.DatabaseName Property

Definition

Gets the name of the database that was deployed from the DAC package.

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

Property Value

A String value that specifies the name of the database deployed from the DAC package.

Attributes

Examples

VC#

System.Console.WriteLine(deployedDac.DatabaseName);  

VB

System.Console.WriteLine(deployedDac.DatabaseName)  

PowerShell

Write-Host $deployedDac.DatabaseName   

Remarks

The DAC package may be deployed on more than one instance of SQL Server running on the same computer.

Applies to