Login.DefaultDatabase 속성
Gets or sets the default database that the login account is assigned to after logging on to the instance of SQL Server.
이 API는 CLS 규격이 아닙니다.
네임스페이스: Microsoft.SqlServer.Management.Smo
어셈블리: Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)
구문
‘선언
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase, _
"master")> _
<SfcReferenceAttribute(GetType(Database), "Server[@Name = '{0}']/Database[@Name = '{1}']", _
)> _
<CLSCompliantAttribute(False)> _
Public Property DefaultDatabase As String
Get
Set
‘사용 방법
Dim instance As Login
Dim value As String
value = instance.DefaultDatabase
instance.DefaultDatabase = value
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase,
"master")]
[SfcReferenceAttribute(typeof(Database), "Server[@Name = '{0}']/Database[@Name = '{1}']",
)]
[CLSCompliantAttribute(false)]
public string DefaultDatabase { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase,
L"master")]
[SfcReferenceAttribute(typeof(Database), L"Server[@Name = '{0}']/Database[@Name = '{1}']",
)]
[CLSCompliantAttribute(false)]
public:
virtual property String^ DefaultDatabase {
String^ get () sealed;
void set (String^ value) sealed;
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase,
"master")>]
[<SfcReferenceAttribute(typeof(Database), "Server[@Name = '{0}']/Database[@Name = '{1}']",
)>]
[<CLSCompliantAttribute(false)>]
abstract DefaultDatabase : string with get, set
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase,
"master")>]
[<SfcReferenceAttribute(typeof(Database), "Server[@Name = '{0}']/Database[@Name = '{1}']",
)>]
[<CLSCompliantAttribute(false)>]
override DefaultDatabase : string with get, set
final function get DefaultDatabase () : String
final function set DefaultDatabase (value : String)
속성 값
유형: System.String
A String value that specifies the default database to which the login account is assigned after logging on to the instance of SQL Server.
구현
주의
Logins are assigned to a database by default after logging on to the instance of SQL Server that is equivalent to the USE DatabaseName Transact-SQL statement.
예
참고 항목
참조
Microsoft.SqlServer.Management.Smo 네임스페이스