Checking Roles Granted to a User

user_role_privs stores roles granted to a user. The columns in user_role_privs:

ColumnTypeDescription
usernameVARCHAR2(30)Name of the user to whom the role has been granted
granted_roleVARCHAR2(30)Name of the role granted to the user
admin_optionVARCHAR2(3)Whether the user is able to grant the role to another user or role (YES or NO)
default_roleVARCHAR2(3)Whether the role is enabled by default when the user connects to the database (YES or NO)
os_grantedVARCHAR2(3)Whether the role was granted by the operating system (YES or NO)

SELECT * FROM user_role_privs;

A user who creates a role is granted that role by default.

Home »
Oracle »
User, Privilege, Role » 

Roles:
  1. Creating Roles
  2. Granting Roles to a User
  3. Checking Roles Granted to a User
  4. Checking System Privileges Granted to a Role
  5. Checking Object Privileges Granted to a Role
  6. Default Roles
  7. Revoking a Role
  8. Dropping a Role
Related: