sp_logininfo

Description

Windows NT only Displays all roles granted to Windows NT users and groups with sp_grantlogin.

Syntax

sp_logininfo ["login_name" | "group_name"]

Parameters

login_name

is the network login name of the Windows NT user.

group_name

is the Windows NT group name.

Examples

Example 1

Displays the permissions granted to the Windows NT user “regularjoe”:

sp_logininfo regularjoe
account name    mapped login name  type            privilege
--------------- ------------------ --------------- -------------- 
HAZE\regularjoe HAZE_regularjoe    user            'oper_role'

Example 2

Displays all permissions that were granted to Windows NT users and groups with sp_grantlogin:

sp_logininfo
account name            mapped login name       type        privilege
---------------         -------------------     ------------  ------------
BUILTIN\Administrators  BUILTIN\Administrators  group 
        ’sa_role sso_role oper_role sybase_ts_role navigator_role
              replication_role’
HAZE\regularjoe         HAZE_regularjoe        user         'oper_role'
PCSRE\randy             PCSRE_alexander        user         'default'

Usage

Permissions

Only a System Administrator can execute sp_logininfo.

See also

Commands grant, setuser

System procedures sp_displaylogin, sp_grantlogin, sp_revokelogin, sp_role, sp_who