Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8330083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:00:38+00:00 2026-06-09T02:00:38+00:00

In Oracle, I attempt to create a view like this create view ddd as

  • 0

In Oracle, I attempt to create a view like this

create view ddd as
  select * 
    from myschema1.t1 
         join myschema2.t2 
....

When I run this statement, I get an error ORA-01031 : insufficient privileges. If I just execute the query in Query Worksheet, however, it works.

Why does my CREATE VIEW statement fail and what privileges do I need in order to make the statement succeed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:00:39+00:00Added an answer on June 9, 2026 at 2:00 am

    In order to create a view that references myschema1.t1 and myschema2.t2, the user that owns the view has to be given access to those two tables directly, not via a role. My first guess is that you have been granted the privileges on the underlying table via a role. You can verify that in SQL*Plus by disabling roles and re-running the query. If you do

    SQL> set role none;
    SQL> select * 
           from myschema1.t1 
                join myschema2.t2 ...
    

    does the query work? If not, then you only have the privileges granted via a role not directly. Note that if you want to be able to grant other users access to your view, you need to be granted privileges on the objects WITH GRANT OPTION.

    GRANT SELECT ON myschema1.t1 TO <<user that will own the view>> WITH GRANT OPTION;
    GRANT SELECT ON myschema2.t2 TO <<user that will own the view>> WITH GRANT OPTION;
    

    If the problem is not with the privileges on the underlying objects, the problem is most likely that you have not been granted the CREATE VIEW privilege.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try this query from Oracle : select * from a_table@Postgres; Here is the
In Oracle PL/SQL I was used to write: SELECT * FROM MY_TABLE WHERE ROWNUM
I have little knowledge on oracle. I tried to create a function like below.
I would like to convert the following query: SELECT request.requestId FROM request LEFT OUTER
Oracle Application server 10g I need to run the long running reports in the
When I attempt to BuildSessionFactory() I get an error saying it cannot find the
This is my code: CREATE OR REPLACE TRIGGER unsuccessful_logins AFTER INSERT OR UPDATE ON
Friends, I'm converting an Oracle Form to Apex and have run into problem(s?) which
Hi I am trying to connect Oracle 10g(Source/Target) from ssis using connection string as
One of our dev team member got an error Attempt to load oracle client

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.