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:端口/实例

猜你喜欢

转载自www.cnblogs.com/yuanchaoyong/p/11570510.html