A technical troubleshooting blog about Oracle with other Databases & Cloud Technologies.

ORA-12101: Materialized View Issue

1 min read
During 19c Upgrade, Materialized view creation which is from a pre-built base table is showing COMPILATION ERROR without any specific error messages.
Base table column had different precision then a pre-built materialized view table and it caused the COMPILATION_ERROR without specifying the correct error message.
Name Type
 --------------------- ----------------
COL1  NUMBER(12)                           --> base table column precision
.

 Name Type
 ----------------- ----------------
 COL1  NUMBER                                --> MV pre-built table column precision
--> both these columns precision is different. it should be same and due to this fact, materialized view  which is built on pre-built table was giving below error
.
so, this COMPILATION_ERROR is internally error ORA-12101
.
12101, 00000, "shape of materialized view does not match the base table"
// *Cause: The number of columns or the type or the length semantics of a
// column in the materialized view did not match the materialized
// view base table.
// *Action: Ensure that the materialized view column list matches with the
// base table.
SOLUTION:

Please ensure both base table and pre-built MV table from which MV is created has same column precision.