共用方式為


DatabaseName 屬性

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

命名空間:  Microsoft.SqlServer.Management.Utility
組件:  Microsoft.SqlServer.Management.Utility (在 Microsoft.SqlServer.Management.Utility.dll 中)

語法

'宣告
<SfcPropertyAttribute(SfcPropertyFlags.Data)> _
Public ReadOnly Property DatabaseName As String
    Get
'用途
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

屬性值

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

備註

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

範例

VC#

System.Console.WriteLine(deployedDac.DatabaseName);

VB

System.Console.WriteLine(deployedDac.DatabaseName)

PowerShell

Write-Host $deployedDac.DatabaseName