• 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

JDBC connection in different machine

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,

I'm trying to connect with oracle installed in different machine. I've oracle client installed in my machine. So i'm writing like this:


abcd is the dns name.
My question is what i've to pass as parameter in the getConnection() method if the other machine has ip: 10.124.12.148 and port:8081.?
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have Oracle as the database, you should be using Oracle's type-4 driver instead of the ODBC bridge driver which is inherently limited.

http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
Download the driver for your version from the link above.

Here's a tutorial on using JDBC with Oracle:
http://infolab.stanford.edu/~ullman/fcdb/oracle/or-jdbc.html
 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by imran quazi:
what i've to pass as parameter in the getConnection() method if the other machine has ip: 10.124.12.148 and port:8081.?



your first place would be Java Doc to find your answer regarding signature of getConnection() method.

JavaDoc DriverManager
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic