ORA-01031: Insufficient Privileges while creating mview in different schema.

I will discuss one of the reason, why creation of materialized view in another schema can cause ORA-01031 error.

SQL> conn test/test

SQL> create materialized view test1.mview1
as select * from test1.table1;

ORA-01031: insufficient privileges

sqlplus / as sysdba

SQL> grant create table to test;

SQL> conn test1/test1

SQL> create materialized view test1.mview1
as select * from test1.table1;

Materialized view created.

In my case test user did not have create table permission. This permission is necessary because during creation materialized view , additional table is created automatically.

SQL> select * from dba_objects where owner=’TEST’;

OBJECT_NAME OWNER OBJECT_TYPE
———– ——- ————-
mv_table1 TEST TABLE
mv_table1 TEST MATERIALIZED VIEW

 

 

 

Advertisement

About Mariami Kupatadze
Oracle Certified Master Linkedin: https://www.linkedin.com/in/mariami-kupatadze-01074722/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: