다음을 통해 공유


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