解决Mac用Navicat连接Oracle数据库报ORA-21561: OID generation failed

1.打开终端,查看 hostname

hostname

显示结果为xxMacBook-Pro.local

2.查看 hosts 文件

cd /etc
open 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

转自https://blog.csdn.net/u013310075/article/details/56005643

你可能感兴趣的:(解决Mac用Navicat连接Oracle数据库报ORA-21561: OID generation failed)