
Hi
I am getting the following error while trying to connect oracle database. I changed the sid in oracle listener.ora file also but the problem is not solved. Please find and reply me a solution. The error is like this as follows..
Exception in thread "main" java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descript
or
The Connection descriptor used by the client was:
localhost:1521:orcl at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:280)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:319)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
344)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:148)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
n.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at ConnDemo1.main(ConnDemo1.java:12)
Thank you.
siva
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.