DatabaseMapping.DBName Property

 

Applies To: SQL Server 2016 Preview

Gets the name of the database in which the login is mapped to the database user.

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

Syntax

[SfcPropertyAttribute(SfcPropertyFlags.None | SfcPropertyFlags.Standalone | SfcPropertyFlags.Matrix)]
public string DBName { get; }
public:
[SfcPropertyAttribute(SfcPropertyFlags::None | SfcPropertyFlags::Standalone | SfcPropertyFlags::Matrix)]
property String^ DBName {
    String^ get();
}
[<SfcPropertyAttribute(SfcPropertyFlags.None | SfcPropertyFlags.Standalone | SfcPropertyFlags.Matrix)>]
member DBName : string with get
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.Matrix)>
Public ReadOnly Property DBName As String

Property Value

Type: System.String

A String value that specifies the name of the database.

Examples

Legacy Code Example

Managing Users, Roles, and Logins

See Also

DatabaseMapping Class
Microsoft.SqlServer.Management.Smo Namespace
Principals (Database Engine)

Return to top