Horus Doc || Database Reference || VxSegmentation   CorbaServer   Maintenance  

Some administrative commands

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;

Commands for system user:

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.


Go to the next section or return to the index.


Generated on Tue Feb 3 14:20:24 2004 for DatabaseReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001