ORA-00942: table or view does not exist

详细原因

  1. 表名拼写错误、大小写混淆;
  2. 当前用户无访问其他方案表,未加用户名前缀;
  3. 表被删除、仅存在同义词但同义词失效;
  4. 权限不足,看不到其他用户表。

完整排查 & 解决

  1. 全局检索表归属

select owner,table_name from dba_tables where table_name like '%EMP%';

  • 跨用户查询需加方案名:select * from scott.emp;
  • 创建同义词简化访问:create public synonym emp for scott.emp;
  • 授予查询权限:grant select on scott.emp to testuser;
上一篇 【转载】HCIE R&S 备考笔记 Qos令牌桶技术原理
下一篇 IPMItool