Oracle CREATE view shows no permissions

Source: Internet
Author: User

Problem: After using Scott to log in to Oracle, create a view that says "Insufficient permissions", How to solve?
Reply:
This is because Scott, the account, does not currently have permission to create views. The workarounds are:
First sign in with the system account, where "Tigertiger" is the password (modifiable) specified when installing Oracle:
Sqlplus System/tigertiger
Then execute:
Grant create any view to Scott
Tip: Authorization is successful.
Perform:
Exit
Exit the current system account.

You can then use Sqlplus login to create a view, such as:
Sqlplus Scott/tigert
Create a simple view below:
Create or Replace View V1
As
SELECT * from T1;

Sometimes the above method does not solve the problem, use the following method:

--Create View permissions, generally on the internet to say this sentence, but the light has this sentence can not be created
Grant CREATE view to B;

--Grant Query permissions
Grant Select any table to B;

--Grant Permissions
Grant Select any dictionary to B;

Appendix: If the above methods do not solve your problem, you can try the following methods. Anyway my problem is solved, record down. I look for a long day;

Describe:

Same database: DB1

Two custom users: USER1, USER2, respectively

Create a view in USER1 that tries to include the table in USER2. Prompt "Insufficient permissions"

Execute the following SQL, depending on your user needs to modify the use:

--Authorized for USER1

GRANT CREATE any TABLE to USER1;
GRANT SELECT any TABLE to USER1;
GRANT COMMENT any TABLE to USER1;
GRANT LOCK any TABLE to USER1;
GRANT SELECT any DICTIONARY to USER1;

--Authorized for USER2

GRANT CREATE any TABLE to USER2;
GRANT SELECT any TABLE to USER2;
GRANT COMMENT any TABLE to USER2;
GRANT LOCK any TABLE to USER2;
GRANT SELECT any DICTIONARY to USER2;

Oracle CREATE view shows no permissions

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.