Oracle database assigns one user to query all tables in another user

Source: Internet
Author: User

Description: Enables user selame to query all tables in user ame (cannot be added and deleted)
1. Create User Selame
Create user selame identified by Password;
2. Set User Selame system permissions
Grant Connect,resource to Selame;

3. Set user Selame object permissions

Grant Select any table to "Selame";

Grant Grant unlimited to "Selame";

4. Execute the following statement

Select ' Grant select on Ame. ' | | table_name| |; To Selame, ' from All_tabels where lower (owner) = ' ame ';

* Below is a table that says you have to assign a value

5. Put the table above saying there is a value to be assigned. Execute it again

such as: Grant Select on AME. D60512017 to Selame;

6. Execute the COMMIT statement

Commit

7. Exit

Quit

8. Log in to the database with user Selame

9. Enquiry Form

SELECT * FROM AME. D60512017;

* "Unselected rows" error if there are no records in the table

The number of record bars in the query record table--select count (*) from AME. D60512017;

View table Structure--desc ame. D60512017;

Insert record--insert into ame.60512017 values (1,1,1,1,1,1);

Query users--show user;

Oracle database assigns one user to query all tables in another user

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.