帆软连接Oracle数据库报错与解决办法
一、问题描述
在使用帆软10.0及以上版本的时候,配置数据连接因Oracle数据库配置有差异,有时提示如下错误:
oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
(CONNECTION_ID=66jvt4gYQHKT442QhccY1g==)
oracle.net.ns.NSProtocolNIO.createRefusePacketException(NSProtocolNIO.java.816)
oracle.net.ns.NSProtocolNIO.handleConnectPacketResponse(NSProtocolNIO.java.396)
oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java.207)
oracle.net.ns.NSProtocol.connect(NSProtocol.java.350)
oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java.1967)
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java.640)
oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java.1032)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java.90)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java.681)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java.602)
com.fr.third.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java.1461)
com.fr.third.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java.1525)
com.fr.third.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java.2165)
二、解决办法:
默认是 : jdbc:oracle:thin:@192.158.1.100:1521:system (这个URL是在定义数据连接的时候自动生成的),这种很多情况下连接不成功。将冒号改成反斜杠即可,如下:
修改为:jdbc:oracle:thin:@1192.158.1.100:1521/system
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/qq_40136336/article/details/132106963