Difference between revisions of "Connecting to Oracle"

From PresenceWiki
Jump to: navigation, search
(Connecting to an Oracle Database with Presence)
 
Line 8: Line 8:
 
Select the appropriate driver for your version of Oracle database.
 
Select the appropriate driver for your version of Oracle database.
  
http://www.international-presence.com/wikidocs/images/oracle_database_resource.gif
+
[[file:oracle_database_resource.gif]]
  
 
=== Driver class ===
 
=== Driver class ===

Latest revision as of 12:26, 21 August 2015

Database Connectivity > Connecting to Oracle


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.

Oracle database resource.gif

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.


Database Connectivity > Connecting to Oracle