aspose file tools
The moose likes JDBC and the fly likes JDBC connection in different machine Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "JDBC connection in different machine" Watch "JDBC connection in different machine" New topic
Author

JDBC connection in different machine

imran quazi
Greenhorn

Joined: Dec 01, 2006
Posts: 18
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.?
Annie Smith
Ranch Hand

Joined: Mar 05, 2005
Posts: 172
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


Cheers!<br /><b>Annie</b>
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1318

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


Saifuddin..
[Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JDBC connection in different machine
 
Similar Threads
Resultset processes 1 record
OpenYMSG API on android
JDBC connection in different machine
Unable to create Data Source in Tomcat
Access Datasouce in java main method