文档解释
ORA-23363: mismatch of mview base table “string” at master and mview site
Cause: The name of the base table of the materialized view at the master site is different from the base table at the materialized view site. This error may arise during offline instantiation of materialized views.
Action: Retry offline instantiation with a materialized view name less than 24 bytes
ORA-23363 错误指的是在主库级别与 Materialized View(MV)的基表有不一致的情况,官方解释:
This means there is a mismatch of the Mview base table at the master and Mview site. It is due to the fact that one or more of the tables participating in the Materialized View at the master site has been altered in some way where the Mview site does not have the latest information about the table.
常见案例
1、在主库上增加了一个列,但是在MV上没有更新相应的变更。
2、在主库上改变了表结构,但是MV上没有及时同步。
3、在主库上删除了一个表,但是在MV上没有移除。
一般处理方法及步骤
1、确定和分析表结构变更,判断变更是否能在 MV 上执行;
2、在修改确定后,先refresh 对应指定MV ;
3、确定完成更新MV 后,重新编译上面变更对应的sql;
4、重新跟新对应表中变更,重新更新MV;
5、再次refresh 对应MV,确定无误,完成操作;