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:
- SelectTable_name
FromUser_tables;
3. view the table names of all users:
- SelectTable_name
FromAll_tables;
4. View All table names (including system tables)
- SelectTable_name
FromAll_tables;
5. View All Tables:
- Select*
FromTab/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 user 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 User Roles: 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 command is used to view User Permissions in Oracle. in DB2, select * From syscat. dbauth or get authorizations is used.
View Sid select * from V $ instance