Share via


DeployedDac.DatabaseName Property

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

Namespace:  Microsoft.SqlServer.Management.Utility
Assembly:  Microsoft.SqlServer.Management.Utility (in Microsoft.SqlServer.Management.Utility.dll)

Syntax

'Declaration
<SfcPropertyAttribute(SfcPropertyFlags.Data)> _
Public ReadOnly Property DatabaseName As String 
    Get
'Usage
Dim instance As DeployedDac 
Dim value As String 

value = instance.DatabaseName
[SfcPropertyAttribute(SfcPropertyFlags.Data)]
public string DatabaseName { get; }
[SfcPropertyAttribute(SfcPropertyFlags::Data)]
public:
property String^ DatabaseName {
    String^ get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.Data)>]
member DatabaseName : string
function get DatabaseName () : String

Property Value

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

Remarks

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

Examples

VC#

System.Console.WriteLine(deployedDac.DatabaseName);

VB

System.Console.WriteLine(deployedDac.DatabaseName)

PowerShell

Write-Host $deployedDac.DatabaseName 

See Also

Reference

DeployedDac Class

Microsoft.SqlServer.Management.Utility Namespace