The Network Adapter could not establish the connection 供应商代码 17002

今天连oracle数据库,其他数据能连上,就是某个数据库连不上,报了个这样的错误:The Network Adapter could not establish the connection 供应商代码 17002。

找了好久才知道是因为tnsnames.ora中此数据库实例填的不是IP地址,而是IP别名,然而在hosts文件中并没有配置IP映射

The Network Adapter could not establish the connection 供应商代码 17002

1、查看tnsnames.ora文件发现,数据库实体用的是IP别名

The Network Adapter could not establish the connection 供应商代码 17002

2、说明在host文件里应该配置有“IP-别名”映射,打开C:\Windows\System32\drivers\etc下的host文件,像如下一样配置即可,

The Network Adapter could not establish the connection 供应商代码 17002