Oracle刷新抛出表未找到异常
有简单的刷新脚本:
BEGIN
DBMS_SNAPSHOT.REFRESH(
LIST => 'SCHEMA_NAME.TABLE_NAME',
PUSH_DEFERRED_RPC => TRUE,
REFRESH_AFTER_ERRORS => FALSE,
PURGE_OPTION => 1,
PARALLELISM => 0,
ATOMIC_REFRESH => TRUE,
NESTED => FALSE);
END;
Oracle 认为:
ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2251
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2457
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2426
ORA-06512: at line 2
00942. 00000 - "table or view does not exist"
问题:我缺少什么?
注意:
- 刷新的 MV 确实存在,结果是相同的
- 如果未指定 schema,则
Having simple refresh script:
BEGIN
DBMS_SNAPSHOT.REFRESH(
LIST => 'SCHEMA_NAME.TABLE_NAME',
PUSH_DEFERRED_RPC => TRUE,
REFRESH_AFTER_ERRORS => FALSE,
PURGE_OPTION => 1,
PARALLELISM => 0,
ATOMIC_REFRESH => TRUE,
NESTED => FALSE);
END;
Oracle argues that:
ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2251
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2457
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2426
ORA-06512: at line 2
00942. 00000 - "table or view does not exist"
Question: what am I missing?
Note:
- Refreshed MV does exist
- if schema is not specified result is the same
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是视图的常见情况,依赖于某些其他表或视图(可能依赖于其他数据),具有破坏的依赖关系。在这种特殊情况下,该视图依赖于其他视图,而其他视图又依赖于缺少列的表。感谢 Frosty Z 给予 提示。
That is a common case of view, depending on some other tables or views (which might depend on other data), having broken dependencies. In this particular case the view depended on other view which depended on a table which was missing a column. Thanx to Frosty Z for giving a hint.
我在其他地方读到执行 a
可以解决这个问题。
它对我不起作用,我必须完全删除并重新创建物化视图。
I have read elsewhere that performing a
can fix this issue.
it didn't work for me and i have to drop and re-create the materialized view completely.