View current session roles for another session

oracle

In Oracle, I can view the currently set roles for my current session using the query SELECT * FROM SESSION_ROLES.

Is there any way that I can see this information for another session?

Best Answer

SESSION_ROLES view shows list of roles assigned after you makes session in instance as those roles granted to your connected users. you can view other users granted roles using below:

select   * from   dba_role_privs;

If you want to know list of roles of particular user, use below query:

select   * from   dba_role_privs where grantee='USER_NAME'; 

Please note that you must have DBA privilege to view above. and you can't see list of roles using currently connected others session. you can only see what role the can be use after getting connected.