oracle 12c PDB里建立的用户登录不上去,显示 IO 错误: Unknown host specified

连接失败, 错误报告:
USER = store
URL = jdbc:oracle:thin:@orclpdb
错误消息 = IO 错误: Unknown host specified

碰到这个问题的童靴们,正解如下:
首先在 Oracle Enterprise Manager Database Express 12c中查看容器名是
这里写图片描述

然后在 $HOME$\product\12.2.0\dbhome_1\network\admin\tnsnames.ora中增加

ORCLPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orclpdb)
)
)
这样,在登录的时候写@orclpdb就可以解析为本地host了,之前出现登录不了也就是无法解析到本地localhost

你可能感兴趣的:(【数据库】➣,oracle)