File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Oracle" Watch "JDBC Oracle" New topic
Author

JDBC Oracle

Murali Koppula
Greenhorn

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,
Murali.

[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.

Jules
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC Oracle
 
Similar Threads
Oracle d.b URL explanation please
problem with Connection object in a servlet
Oracle JDBC connection in a servlet
Strange problem in Tom CAT + oracle +JDBC connection
Need a guide how to connect JBoss 3.2.5 to Oracle 9i