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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to resolve ORA-30372 when creating a materialized view in 12c

User_YZUXYJan 28 2021

Hello all,
I am very new at Oracle db administration, so please be patient. I have built an Oracle 12c pluggable database for a c2m testing / development system using the oracle installation guide. There is one step to run the attached query. The query creates a materialized view. When I run the query I get the attached error. I have searched around quite a bit on google and the oracle sites. However, I am not knowledgeable enough to know what I need to do to make it work. I asked the guy that created the production database server and he did not recall seeing the error before.
Some information I have found suggest:
Use refresh force on demand using trusted constraints. The query currently has refresh complete on demand using enforced constraints.
grant exempt access policy system privilege to the creator, owner, and refresher of the MV.
define a policy function to return a null policy during create and refresh operations on the MV.
Is it acceptable to modify the oracle provided query from enforced constraints to trusted constraints?
Granting different privileges to the user would probably work, but I would think it is not the correct solution.
I would greatly appreciate it if someone could give me a pointer on how to resolve this issue. Even a pointer in the right direction with the option to ask follow up questions would be good.
Thank you,
D1_ACTIVITY_STAT_MV_error.txt (578 Bytes)D1_ACTIVITY_STAT_MV.txt (2 KB)

This post has been answered by Solomon Yakobson on Jan 30 2021
Jump to Answer

Comments

Post Details

Added on Jan 28 2021
7 comments
4,910 views