File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes JDBC Oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC Oracle" Watch "JDBC Oracle" New topic

JDBC Oracle

Murali Koppula

Joined: May 07, 2002
Posts: 10
Hello Java Ranchers,

When I attempt to get a Connection object from the driver manager, I use the syntax (as per Oracle JDBC doc):

Connection conn = DriverManager.getConnection
("jdbc racle ci:@MyHostString", "scott", "tiger");

My question is about the first argument "jdbc racle ci:@MyHostString":
Is 'MyHostString' the service name or the Oracle SID?

Specifically in a RAC environment, where I have multiple instances and a single service, which on do I specify there? Service name or the ORACLE_SID?

Thanks a lot in advance,

[edited to disable smilies]
[ September 05, 2004: Message edited by: Jeanne Boyarsky ]
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Hi Murali,

From the Oracle Tech Net, found through a Google search on "jdbcracleci", it looks like MyHostString can take the form hostname:port:SID, amongst others. Check out the link for more info.

I agree. Here's the link:
subject: JDBC Oracle
It's not a secret anymore!