sp_activeroles

Displays all active roles.

Syntax

sp_activeroles [expand_down]

Parameters

Examples

Usage

sp_activeroles displays all your active roles and all roles contained by those roles.

See also:
  • alter role, create role, drop role, grant, revoke, set in Reference Manual: Commands

  • For information about creating, managing, and using roles, see the System Administration Guide.

  • mut_excl_roles, proc_role, role_contain, role_name in Reference Manual: Building Blocks

Permissions

Any user can execute sp_activeroles. Permission checks do not differ based on the granular permissions settings.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

Related reference
sp_displayroles