Logins 속성
Represents a collection of Login objects. Each Login object represents a login defined on the instance of SQL Server.
네임스페이스: Microsoft.SqlServer.Management.Smo
어셈블리: Microsoft.SqlServer.Smo.dll의 Microsoft.SqlServer.Smo
구문
‘선언
<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny, _
GetType(Login))> _
Public ReadOnly Property Logins As LoginCollection
Get
‘사용 방법
Dim instance As Server
Dim value As LoginCollection
value = instance.Logins
[SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny,
typeof(Login))]
public LoginCollection Logins { get; }
[SfcObjectAttribute(SfcContainerRelationship::ObjectContainer, SfcContainerCardinality::ZeroToAny,
typeof(Login))]
public:
property LoginCollection^ Logins {
LoginCollection^ get ();
}
[<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny,
typeof(Login))>]
member Logins : LoginCollection
function get Logins () : LoginCollection
속성 값
형식: Microsoft.SqlServer.Management.Smo. . :: . .LoginCollection
A LoginCollection object that represents all the logins defined on the instance of SQL Server.
주의
The Logins property points to the LoginCollection object. The collection can be used to enumerate all the logins for the instance of SQL Server. If you are using Windows Authentication only, the Logins property represents Windows-authenticated accounts. With Mixed Mode Authentication, this property also represents accounts that are created by using SQL Server Authentication.
예제
'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Display the logins on the instance of SQL Server.
Dim lg As Login
For Each lg In srv.Logins
Console.WriteLine(lg.Name)
Next