【解决】Mac升级Mojave后用Navicat连接Oracle数据库报ORA-21561: OID generation failed

原文链接:https://blog.csdn.net/u013310075/article/details/56005643

一、原因排查

终端执行命令:

xxxdeMacBook-Pro:~ xxx$ hostname
xxxdeMacBook-Pro.local

发现是 输出的hostname为 .local 而不是 localhost 

查看 hosts 文件 :

vim /etc/hosts

内容如下: 

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost

问题已经找到了,因为 hostname 和 hosts 文件里的 hostname 不一致,也就是本机hostname为.local而hosts文件中的hostname为localhost

解决办法,修改 hostname 与 hosts 里保持一致,即在终端中执行下面这条命令即可

sudo scutil --set HostName localhost

重新连接 Oracle,问题解决。

猜你喜欢

转载自blog.csdn.net/womeng2009/article/details/83582763
oid