--View the relationship between the user and the default table space
Select Username,default_tablespace from Dba_users;
--View the tables that the current user can access
SELECT * from User_tables;
--oracle Querying user tables
SELECT * from User_all_tables;
--oracle Querying user views
SELECT * from User_views;
--Querying all functions and stored procedures:
SELECT * from User_source;
--Query All users:
SELECT * from All_users;
--select * from Dba_users
--View Current user connections:
SELECT * from V$session;
--View User roles
SELECT * from User_role_privs;
--View Current user permissions:
SELECT * from Session_privs;
--View the roles owned by all users
SELECT * from Dba_role_privs;
--View all roles
SELECT * from Dba_roles;
--View database name
SELECT NAME from V$database;
--View all table space usage
Select a.file_id "Fileno",
A.tablespace_name "Tablespace_name",
A.bytes "bytes",
A.bytes-sum (NVL (b.bytes, 0)) "used",
Sum (NVL (b.bytes, 0)) "Free",
Sum (NVL (b.bytes, 0))/a.bytes * "%free"
From Dba_data_files A, dba_free_space b
where a.file_id = b.file_id (+)
Group by A.tablespace_name, a.file_id, a.bytes
Order BY A.tablespace_name;
Oracle View Current User rights