1. View All Users:
SELECT * from Dba_users;
SELECT * from All_users;
SELECT * from User_users;
2. View user or role system permissions (directly assigned to user or role system permissions): SELECT * from Dba_sys_privs;
SELECT * from User_sys_privs;
3. View the rights included in the role (view only the roles owned by the logged on user)
Sql>select * from Role_sys_privs;
4. View User Object permissions: SELECT * from Dba_tab_privs;
SELECT * from All_tab_privs;
SELECT * from User_tab_privs;
5. View all roles:
SELECT * from Dba_roles;
6. View the roles that a user or role has:
SELECT * from Dba_role_privs;
SELECT * from User_role_privs;
7. See which users have SYSDBA or Sysoper system privileges (requires appropriate permissions when querying)
SELECT * FROM V$pwfile_users
For example, I want to see the permissions that user Scott has:
Sql> SELECT * from Dba_sys_privs where grantee= ' SCOTT ';
GRANTEE Privilege Admin_option
-------- ---------------------- ------------
SCOTT CREATE TRIGGER NO
SCOTT Unlimited tablespace NO
For example, I want to see the roles that user Scott has:
Sql> SELECT * from Dba_role_privs where grantee= ' SCOTT ';
Grantee granted_role admin_option default_role
-------------------------------------------
SCOTT dba NO YES
To view all permissions and roles for a user
Select privilege from Dba_sys_privs where grantee= ' SCOTT '
Union
Select privilege from Dba_sys_privs where grantee in
(select Granted_role from Dba_role_privs where grantee= ' SCOTT ');