SQL to retrieve username, role and privs - 10g r2
We are trying to generate a list of a database user alongwith what role(s) and privilege(s)
it has. It is a 10g R2 database
If we are not mistaken, the required data dictionary views involved in the query would be
1. DBA_USERS --> to retrieve USERNAME
2. DBA_SYS_PRIVS --> to retrieve PRIVILEGE
3. DBA_ROLE_PRIVS --> to retrive GRANTED_ROLE
The format of the report should be like
username privilege granted_role
ABC create table connect
resource
XYZ create table connect
create sequence resource
create view
Could someone please provide us with the query that would allow us to generate the above output?