wood burning stoves 2.0*
The moose likes JDBC and the fly likes JDBC connection in different machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
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: 1321

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..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC connection in different machine
 
Similar Threads
OpenYMSG API on android
Access Datasouce in java main method
JDBC connection in different machine
Unable to create Data Source in Tomcat
Resultset processes 1 record