详细原因
- 表名拼写错误、大小写混淆;
- 当前用户无访问其他方案表,未加用户名前缀;
- 表被删除、仅存在同义词但同义词失效;
- 权限不足,看不到其他用户表。
完整排查 & 解决
- 全局检索表归属
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;