Oracle刷新抛出表未找到异常

发布于 2024-12-28 04:42:27 字数 673 浏览 1 评论 0原文

有简单的刷新脚本:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

瑕疵 2025-01-04 04:42:27

这是视图的常见情况,依赖于某些其他表或视图(可能依赖于其他数据),具有破坏的依赖关系。在这种特殊情况下,该视图依赖于其他视图,而其他视图又依赖于缺少列的表。感谢 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.

享受孤独 2025-01-04 04:42:27

我在其他地方读到执行 a

ALTER MATERIALIZED VIEW schema_name.table_name COMPILE;

可以解决这个问题。

它对我不起作用,我必须完全删除并重新创建物化视图。

I have read elsewhere that performing a

ALTER MATERIALIZED VIEW schema_name.table_name COMPILE;

can fix this issue.

it didn't work for me and i have to drop and re-create the materialized view completely.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文