Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Critical Qs on materialized views
We need to create the Materlialized view on PRE-Built Table WITHOUT adding a Constraint to the Master/source Table. This is needed because the Production (LIVE) Database(Master/Source) has NO existing constraints & creating the same on the large 600 GB production Database's tables would be nearly impossible.
NOTE - We are getting the following Errors when attempting to create a Materlialized view on PRE-Built Table WITHOUT adding a Constraint to the
Master/source Table:-
SQL> create materialized view d1 BUILD IMMEDIATE
2 refresh complete as select * from d1_at_S829mig_teja;
refresh complete as select * from d1_at_S829mig_teja
*
ERROR at line 2:
ORA-12014: table 'D1' does not contain a primary key constraint
SQL> create materialized view d1 BUILD IMMEDIATE refresh complete with
rowid
2 as select * from d1_at_S829mig_teja ;
as select * from d1_at_S829mig_teja
*
ERROR at line 2:
ORA-00955: name is already used by an existing object
SQL> create materialized view d1 on prebuilt table refresh complete with
rowid
2 as select * from d1_at_S829mig_teja;
as select * from d1_at_S829mig_teja
*
ERROR at line 2:
ORA-12058: materialized view cannot use prebuilt table
Give Command with respective syntax, if possible.
Another basic question - When a constraint is created does it automatically create an internal underlying index on the respective table?
Thanks indeed
![]() |
![]() |