程序连接oracle失败

前端之家收集整理的这篇文章主要介绍了程序连接oracle失败前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

记录一次jdbc连接oracle失败的原因


ERROR [RMI TCP Connection(3)-127.0.0.1] - init datasource error

java.sql.sqlException: Listener refused the connection with the following error:

ORA-12505,TNS:listener does not currently know of SID given in connect descriptor






jdbc配置如下:

jdbc.driverClassName=oracle.jdbc.driver.OracleDriver jdbc.url=jdbc:oracle:thin:@192.168.118.197:1521:orcl jdbc.username=learn_in jdbc.password=123456
 
下面为正确的:
	
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver jdbc.url=jdbc:oracle:thin:@//192.168.118.197:1521/orcl jdbc.username=learn_in jdbc.password=123456
原文链接:https://www.f2er.com/oracle/210984.html

猜你在找的Oracle相关文章