(Windows only) Displays all roles granted to Windows users and groups with sp_grantlogin.
sp_logininfo ["login_name" | "group_name"]
sp_logininfo regularjoe
account name mapped login name type privilege --------------- ------------------ --------------- -------------- HAZE\regularjoe HAZE_regularjoe user 'oper_role'
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'
sp_logininfo displays all roles granted to Windows users and groups with sp_grantlogin.
You can omit the domain name and domain separator (\) when specifying the Windows user name or group name.
See also grant, setuser in Reference Manual: Commands.
The permission checks for sp_logininfo differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be a user with manage roles privilege. |
Disabled | With granular permissions disabled, you must be a user with sa_role. |
Values in event and extrainfo columns from the sysaudits table are:
Information | Values |
---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|