Monday, August 10, 2015

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

Following error is seen when trying to configure a new jdbc pool with the back-end.

ERROR : 

FATAL DataSourcePool getDataSourceConnection Can't create a new connection for name on java:comp/env/jdbc/SID3 exception: 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
 code: 12505 ^?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^? ^?       at oracle.jdbc.driver.logon(java:419)^?     at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:536)^?  at oracle.jdbc.driver.<init>(T4CConnection.java:228)^?    at oracle.jdbc.driver.getConnection (T4CDriverExtension.java:32)^?    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)^?     at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:218)^?

Solution:

Solution for this particular issue resides in the error itself.

If the url mentioned during the pool configuration is as following from the server.xml. <resource tab>

url="jdbc:db2://dbhostname:portnumber/SID3"

The last parameter will be the SID. Recheck the sid value, Above error is seen when the SID value is specified incorrectly. Change the SID3 with the correct SID and the issue will be resolved.

0 comments:

Post a Comment