[Reprint] view User Permissions and indexes in Oracle

Source: Internet
Author: User
\" 1. View All Users
Select * From all_users; ------- view all users
Select * From user_users; -------- view current user
2. View user or role system permissions:
Select * From user_sys_privs; -------- view permissions of the current user
3. view the permissions contained in the role
Select * From role_sys_privs ;-------
4. View user object permissions
Select * From all_tab_privs; -------- view the operational table permissions of the users used Select * From user_tab_privs; -------- view the table permissions of the current user
5. View roles owned by a user or role
Select * From user_role_privs; ------ view the role of the current user
View the constraints of a table, including the foreign key of the primary key. And Index
Select * from user_constraints where TABLE_NAME = \'? \ '; ----- View the constraints of a table
Select constraint_type, constraint_name, search_condition from all_constraintsWhere table_name = \'? \';
Select * from user_cons_columns where TABLE_NAME = \'? \ '; ----- Composition of a constraint
Select index_name, index_type, status, blevel from user_indexes where table_name = \'? \ '; ----- View all indexes of a table
SELECT table_name, index_name, column_name, column_position FROM user_ind_columns WHERE table_name = \'? \ '; ---- View the index structure
\"
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.