List tables created by the user:
SQL> SELECT table_name FROM user_tables;
List roles granted to user:
SQL> SELECT * FROM session_roles;
List privileges granted to user:
SQL> SELECT * FROM session_privs;
Current username:
SQL> SELECT username FROM user_users;
List table privileges where the grantee is the current user:
SQL> SELECT * FROM user_tab_privs_recd;
List privileges granted on tables owned by the current user:
SQL> SELECT * FROM user_tab_privs_made;
List roles granted to user 'newuser':
SQL> SELECT * FROM dba_role_privs WHERE grantee='newuser';
List system privileges granted to all roles:
SQL> SELECT * FROM role_sys_privs;
All this information is being retrieved from Data Dictionary Views. user_tables, session_roles, dba_role_privs, etc... are all data dictionary views. You can get a list and description of all data dictionary views through the table DICTIONARY
and the DESCRIBE
command.