66000][12505] Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor oracle.n et.ns.NetException: Listener refuse

新装的idea开发工具后连接数据库出现如题所示错误。

1、网上搜了不少的文章,没有解决我的问题。后来细心看了一下url:

一开始url是这样子的。

jdbc:oracle:thin:@10.10.21.10:1521:s21_pdb_ipay

 

 

2、由于是idea开发工具自动生成的,SID不匹配此请求url,需要改成如下完美解决问题,注意双斜杠跟单斜杠。

jdbc:oracle:thin:@//数据库ip:端口/实例

 

posted @ 2019-09-23 09:21  晴空~万里  阅读(6305)  评论(0编辑  收藏  举报