aspose file tools*
The moose likes JDBC and the fly likes JDBC code for oracle RAC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply locked New topic
Author

JDBC code for oracle RAC

Sushil Suvarna
Greenhorn

Joined: May 28, 2004
Posts: 14
Hi
Can somebody give me the jdbc code to connect to oracle rac.

Sushil.
Jyothi Lature
Ranch Hand

Joined: Oct 31, 2001
Posts: 60
Hi,

I dont think there will be any change in the code part, except that you might have to have a JDBC driver (for ex: Oracle Thin driver) that supports Oracle RAC(Oracle Real Application Clusters).

In case if you are using Weblogic Application Server, then you can refer to this link which will help you in setting up the connection to Oracle RAC..
http://e-docs.bea.com/wls/docs81/jdbc/oracle_rac.html

Hope this helps..


Jyothi<br />Sun Certified Java Programmer<br />Brainbench Certified for Javascript
Jyothi Lature
Ranch Hand

Joined: Oct 31, 2001
Posts: 60
Hi,

JDBC thin driver does not use tnsnames.ora to make a connection.
Using a tnsname here instead of the SID is quite an easy error to make. If it is a name in your TNS file, then replace the host string name with the network name of the Oracle server. That should resolve your problem.

Also, to add to this, some extra info with regard to OCI and Thin driver is...

The JDBC OCI driver provides an implementation of the JDBC interfaces using the Oracle Call Interface (OCI).
The JDBC OCI driver requires an Oracle client installation including Net8.

The JDBC Thin driver establishes a direct connection to the database server using Java Sockets.
The JDBC Thin driver does not require Oracle software on the client side; however, there must be an Oracle listener process correctly installed on the Oracle server.

Hope this helps.


Note:
Please donot use Display Name for the Topic, as this will not help anybody to understand what the topic is all about.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

Sushil, please respond in the the same topic rather than starting new ones. Please continue this discussion here.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Consider Paul's rocket mass heater.
 
subject: JDBC code for oracle RAC