EnumAccountInfo Method
Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.
The EnumAccountInfo method returns a QueryResults object that enumerates Microsoft Windows NT 4.0, Microsoft Windows 2000, or Microsoft Windows Server 2003 accounts granted access permission to an instance of Microsoft SQL Server.
구문
object
.EnumAccountInfo( [ Account ]
, [ ListAll ] )
as QueryResults
Parts
- object
Expression that evaluates to an object in the Applies To list.
- Account
String that identifies an existing Windows user or group by name.
- ListAll
TRUE or FALSE.
Prototype (C/C++)
HRESULT EnumAccountInfo(
LPSQLDMOQUERYRESULTS* ppResults,
SQLDMO_LPCSTR Account = NULL,
BOOL ListAll = FALSE);
Returns
A QueryResults object that contains one result set defined by these columns.
Column | Data type | Description |
---|---|---|
account name |
nvarchar(129) |
Windows NT 4.0, Microsoft Windows 2000, or Microsoft Windows Server 2003 account name |
type |
varchar(18) |
String that identifies account type, such as group |
privilege |
varchar(18) |
String that specifies privilege level, such as admin or username |
mapped login name |
nvarchar(129) |
SQL Server login name used when mapping the account |
permission path |
nvarchar(129) |
String that specifies Windows NT 4.0, Microsoft Windows 2000, or Microsoft Windows Server 2003 group granting access |
주의
When using the Account argument to restrict results, fully qualify the Windows NT 4.0 or Microsoft Windows 2000 account name, that specifies both domain and user or group name. For example:
oQR = oSQLServer.EnumAccountInfo("SEATTLE\someone")
When specifying a Windows NT 4.0, Microsoft Windows 2000, or Microsoft Windows Server 2003 group using the Account argument, the QueryResults object returned contains one row for each Windows NT 4.0, Microsoft Windows 2000, or Microsoft Windows Server 2003 account with membership in the group.
Use the ListAll argument when that enumerates account information for Windows NT users. When ListAll is TRUE, the EnumAccountInfo method returns a result set that contains all SQL Server security-enabled groups in which the specified user has membership.