Page 1 of 1

JDBC Connector issue while connecting Oracle Database

Posted: Wed Dec 07, 2016 10:58 am
by satheesh_color
Hi All,

We have a remote Oracle DB for which we were trying to access using jdbc connector and use oracle thin client to connect to the database.we tried with the below

URL: jdbc:oracle:thin@x.x.x.x:1521:SID
AND
URL: jdbc:oracle:thin@x.x.x.x:1521/SID

We were able to find the instance as CD12,CD14 using the query (select instance from v$thread;) and pass it as the above SID.

When we use :(colon before DB SID)

Fatal Error: The connector failed to connect to the data source. The reported error is: 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


When we use /(slash before DB SID)

Fatal Error: The connector failed to connect to the data source. The reported error is: java.sql.SQLRecoverableException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor


Kindly help us out to overcome this issue.

Thanks,
Satheesh.R

Posted: Wed Dec 07, 2016 10:55 pm
by satheesh_color
Hi,

Now I am getting the below error message


The reported error is: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection