Solved

Error in creating a materialized view (ora-00942)

Posted on 2013-10-23
6
2,248 Views
Last Modified: 2013-10-25
I will like to create a materialized view on a schema tr which has select grant on a table cars on a different schema src
I used the following statement
CREATE MATERIALIZED VIEW tr.cars_mv
TABLESPACE xxxx
LOGGING
       REFRESH FAST
  WITH PRIMARY KEY
       AS
SELECT
Name,
Type
FROM src.cars
;

I am having the following  error:
ora-00942: table or view does not exist

I have done the following checks
•      the spelling of the table or view name.
•      that a view is not specified where a table is required.
•      that an existing table or view name exists.

In fact if I run the query under tr it functions that is without the create materialized view statement

What could be the source of the error. Could it be related to the characteristics of the materialized view (  REFRESH FAST ) to be created
0
Comment
Question by:diteps06
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 480 total points
ID: 39593784
Try an explicit grant not through a view.

Log into src and execute:
grant select on cars to tr;
0
 
LVL 1

Author Comment

by:diteps06
ID: 39594221
I forgot to mention a detail the table cars have a materialized view log table created on it.
the schema tr doesn't yet have a grant select on it. Maybe this is cause of the error. I am still to verify it
0
 
LVL 1

Assisted Solution

by:hinpong
hinpong earned 20 total points
ID: 39599217
They are under two different schema, tr and src? If so, you need to grant select privilges

connect src
grant select on cars to tr;
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39599265
hinpong,

How is your post any different than what I have already posted?

Please read previous posts before responding.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39599381
diteps06,

Mind if I ask why the "B" penalty grade?  What additional assistance did you need before providing an "A" grade.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question