Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Insufficient privileges in creating MV which it select table from another schema

norton2001Oct 30 2013 — edited Nov 1 2013

Hi there,

Before asking this question, I have checked through similar questions in forum, but I fail to see my situation, or I would say I am unclear about the solution.

I got CREATE MATERIALIZED VIEW and CREATE ANY MATERIALIZED VIEW privileges, and I want to create a MV in my schema, but the MV selects data from another schema, and I got privilege to select that table. Here is my code

Create MATERIALIZED VIEW CPY_GL_HANDS_OFF_DTL

REFRESH START WITH GREATEST(SYSDATE,TO_DATE('2013.10.30.23.30.00','YYYY.MM.DD.HH24.MI.SS')) NEXT SYSDATE + (50519/(24*60*60)) COMPLETE

ENABLE QUERY REWRITE AS

SELECT

    *

FROM

    User_A.GL_HANDS_OFF_DTL@dblink;

I execute it, and I get ORA-01031: insufficient privileges. According to my research so far, the schema User_A requires to have CREATE TABLE privilege, although it has already had RESOURCE (which already includes CREATE TABLE). Is that so? That's my problem. I only has read access to the table over the dblink, I can't control that schema's privileges. Would you please advise if it is real problem?

Thanks and regards

This post has been answered by sb92075 on Oct 30 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 29 2013
Added on Oct 30 2013
7 comments
5,444 views