Oracle Database - How to check if user roles and system roles are separated?

I have these two table. How do I see if user roles and system roles are seperated?

SQL> desc DBA_ROLES;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ROLE                                      NOT NULL VARCHAR2(30)
 PASSWORD_REQUIRED                                  VARCHAR2(8)
 AUTHENTICATION_TYPE                                VARCHAR2(11)

SQL> desc DBA_SYS_PRIVS;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 GRANTEE                                   NOT NULL VARCHAR2(30)
 PRIVILEGE                                 NOT NULL VARCHAR2(40)
 ADMIN_OPTION                                       VARCHAR2(3)

You need to look at table DBA_ROLE_PRIVS to see which accounts have what roles granted, however you have to then know what those roles grant, so you will have to review:-

  • DBA_ROLE_PRIVS again for nested roles
  • DBA_TAB_PRIVS for data access rights
  • DBA_SYS_PRIVS for system privileges

You may findthat you loop through DBA_ROLE_PRIVS a few times. Also remember that there is the PUBLIC role to consider.

Robin