Oracle views users, user permissions, user tablespace, and user default tablespace

Source: Internet
Author: User

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:

  1. SelectTable_name
    FromUser_tables;

3. view the table names of all users:

  1. SelectTable_name
    FromAll_tables;

4. View All table names (including system tables)

  1. SelectTable_name
    FromAll_tables;

5. View All Tables:

  1. 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:

    1. Select a. file_id "fileno", A. tablespace_name
    1. "Tablespace_name ",
    1. A. bytes "bytes", A. bytes-sum (nvl (B. bytes, 0) "used ",
    1. Sum (nvl (B. bytes, 0) "free ",
    1. Sum (nvl (B. bytes, 0)/A. bytes * 100 "% free"
    1. From dba_data_files A, dba_free_space B
    1. Where a. file_id
      = B
      . File_id (+)
    1. Group by A. tablespace_name,
  1. 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
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.