• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

not able to connect with 10g

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 814
Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
still not abel to connect...
 
reply
    Bookmark Topic Watch Topic
  • New Topic