解决ORA-21561: OID generation failed

在Mac上用Navicat连接Oracle的时候总是提示:ORA-21561: OID generation failed
现象以及搜索结果

Connection Via 10.2.0.3 SQL*Net Fails With Error ORA-21561: OID Generation Failed [ID 559981.1]
Cause
Incorrect /etc/hosts mapping for the client machine or no mapping at all.
Solution
Check the client's /.../hosts file and verify that the local node is correctly identified with a mapping for both the short and fully qualified name of the host.

解决过程
在终端上输入:

hostname

比如得到了tan9le_demo这样的机器名,那么接着就需要编辑/etc/hosts文件,添加:

127.0.0.1 tan9le_demo

保存并推出,再次打开客户端,恢复正常。

标签: oracle