Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

not able to connect with 10g

 
Inder Kumar Rathore
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Inder Kumar Rathore
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
still not abel to connect...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic