Connecting to Oracle

From PresenceWiki
Revision as of 14:36, 4 February 2010 by Mattpryor (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Connecting to an Oracle Database with Presence

Connection to Oracle databases requires the Thin Oracle JDBC driver. This can be downloaded from Oracle's Website.

Select the appropriate driver for your version of Oracle database.

Driver class

This should be set to:

oracle.jdbc.OracleDriver

(You will first need to import the JDBC Jar files which you have downloaded from the above location)

Single Server Connections

If your Oracle database runs in a non clustered environment you should use the following connection URL:

jdbc:oracle:thin:@[HOSTNAME]:1521:[SID]

Where [HOSTNAME] and [SID] are the server hostname and the database identifier respectively.

Cluster Connections

If you are using RAC then the following connection URL should be used to address the cluster instead of a single server (remove the line breaks)

jdbc:oracle:thin:@(DESCRIPTION= 
  (LOAD_BALANCE=on) 
  (ADDRESS=(PROTOCOL=TCP)(HOST=[HOSTNAME1])(PORT=1521)) 
  (ADDRESS=(PROTOCOL=TCP)(HOST=[HOSTNAME2])(PORT=1521)) 
  (CONNECT_DATA=(SERVICE_NAME=[CLUSTER_SID])) 
)

Where [HOSTNAME1], [HOSTNAME2] refer to the servers that are on the cluster, and CLUSTER_SID refers to the Cluster SID.

Please contact us if you require any alternative configurations and we will be more than happy to assist.