Login.DefaultDatabase Property
Gets or sets the default database that the login account is assigned to after logging on to the instance of SQL Server.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Deklaracja
<SfcPropertyAttribute> _
Public Property DefaultDatabase As String
[SfcPropertyAttribute]
public string DefaultDatabase { get; set; }
[SfcPropertyAttribute]
public:
virtual property String^ DefaultDatabase {
String^ get () sealed;
void set (String^ value) sealed;
}
/** @property */
public final String get_DefaultDatabase ()
/** @property */
public final void set_DefaultDatabase (String value)
public final function get DefaultDatabase () : String
public final function set DefaultDatabase (value : String)
Property Value
A String value that specifies the default database to which the login account is assigned after logging on to the instance of SQL Server.
Remarks
Logins are assigned to a database by default after logging on to the instance of SQL Server that is equivalent to the USE DatabaseNameTransact-SQL statement.
Thread Safety
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.
Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.
See Also