View the relationship between the user and the default tablespace.
Select username, default_tablespace from dba_users;
1. view the table structure: DESC table name
2. view the table of the current user:
- select table_name from user_tables;
3. view the table names of all users:
- select table_name from all_tables;
4. View All table names (including system tables)
- select table_name from all_tables;
5. View All Tables:
- Select
*
From
Tab/dba_tables/dba_objects/CAT;
The following describes how to query user tablespaces in Oracle.
◆ Oracle query user tablespace: Select * From user_all_tables
◆ Oracle queries all functions and stored procedures: Select * From user_source
◆ Query all oracle users: Select * From all_users.select * From dba_users
◆ Oracle view current user connection: Select * from V $ session
◆ View current user permissions in Oracle: Select * From session_privs
◆ ORACLE:
- 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 * 100 "% 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;
1. View All Users:
Select * From dba_user;
Select * From all_users;
Select * From user_users;
2. view the user's system permissions:
Select * From dba_sys_privs;
Select * From all_sys_privs;
Select * From user_sys_privs;
3. View user object permissions:
Select * From dba_tab_privs;
Select * From all_tab_privs;
Select * From user_tab_privs;
4. view all roles:
Select * From dba_roles;
5. view the roles owned by the user:
Select * From dba_role_privs;
Select * From user_role_privs;
6. view the permissions of a role:
select * from role_sys_privs;
select * from role_tab_privs;
7. View All system Permissions
select * from system_privilege_map;
8. View All object permissions
select * from table_privilege_map;
The preceding figure shows how to view User Permissions in Oracle,
In DB2:
Select * From syscat. dbauth
Or
Get authorizations
View Sid
Select * from V $ instance
========================================