Oracle Apex ORA-00942: table 或视图不存在但确实存在

Oracle Apex ORA-00942: table or view does not exist but it does exist

我使用我的个人工作区开发了一个应用程序。将其导出并稍后将其安装在开发人员团队工作区中。 我的几个页面出现 ORA-00942:table 或视图不存在而 运行,这没有意义,因为 table 确实存在(我使用'SQL Commands' 选项)。 有趣的是,我正在使用的相同代码实际上应用于同一工作区内的不同应用程序,并且运行完美。 这是正常行为吗?可能是由于工作区的配置?

谢谢!

我要检查的第一件事是应用程序的解析模式 - 请参阅共享组件 -> 安全属性。

如果这在您的应用程序的两个实例之间不相同,这就是可能的解释。

可能是“权限”问题:

http://www.dba-oracle.com/sf_ora_00942_table_or_view_does_not_exist.htm

Answer: There are several common operations that cause a ORA-00942 error:

  • Table owner name not specified when logged-in as a non-creator of the table.
  • ORA-00942 on table import (imp or impdp).
  • ORA-00942 on materialized view refresh.

...

This ORA-00942 error on insert is common when the user you are signed-on as does not have permission to see the table!

Either make the table public and grant DML privileges:

  • connect myuser/mypass
  • create public synonym testtable for myuser.testtable
  • grant insert, select, update, delete on mytable to public;

另外,请查看对此主题的各种回复。例如:

Because this post is the top one found on Whosebug when searching for "ORA-00942: table or view does not exist insert", I want to mention another possible cause of this error (at least in Oracle 12c): a table uses a sequence to set a default value and the user executing the insert query does not have select privilege on the sequence. This was my problem and it took me an unnecessarily long time to figure it out.