| Author |
not able to connect with 10g
|
Inder Kumar Rathore
Ranch Hand
Joined: Apr 14, 2010
Posts: 41
|
|
hi I am connecting oracle 10 g but I am not able to connect..
It gives exception java.sql.SQLException
this is my consoles output
E:\Prgm\Rathore>java OracleConnectionUrl
Oracle JDBC driver loaded ok.
Exception: java.sql.SQLException: Listener refused the connection with the follo
wing 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
also I am not good in oracle...
please suggest some points.....
thanks
|
Thanks
Living is easy with your eyes closed.....
|
 |
Ninad Kulkarni
Ranch Hand
Joined: Aug 31, 2007
Posts: 774
|
|
Look for following file in your system
"AccordingToYourOracle10gPath"\network\admin\tnsnames.ora file
In that you will find service name which is your SID created by oracle configuration tool.
Depending on Oracle version and JDK version you will need appropriate JDBC driver if you don't have.
|
SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
|
 |
Inder Kumar Rathore
Ranch Hand
Joined: Apr 14, 2010
Posts: 41
|
|
This is my tnsnames.ora file..
Instead of using type 4 driver I used type 1 driver that is jdbc-odbc bridge, and the connection was established by crating a dsn ("mushi") and using same username and passowrd...
here I'll send my my source code...
|
 |
Inder Kumar Rathore
Ranch Hand
Joined: Apr 14, 2010
Posts: 41
|
|
|
still not abel to connect...
|
 |
 |
|
|
subject: not able to connect with 10g
|
|
|