Difference between revisions of "Install Oracle"

From FMR Knowledge Base
Jump to navigation Jump to search
(Oracle JDBC Driver)
(11 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
[[Category:Draft_-_Installation_and_Configuration]]
 +
 
[[Category:How_To]]
 
[[Category:How_To]]
 
[[Category:How_To V11]]
 
[[Category:How_To V11]]
Line 5: Line 7:
  
 
= Obtaining and Specifying the Oracle JDBC Driver =
 
= Obtaining and Specifying the Oracle JDBC Driver =
 
 
To get FMR to communicate succesfully with an Oracle database, there are three tasks to perform:
 
To get FMR to communicate succesfully with an Oracle database, there are three tasks to perform:
 
# Obtain the correct dependency file
 
# Obtain the correct dependency file
Line 11: Line 12:
 
# Specify the appropriate Credentials to FMR.
 
# Specify the appropriate Credentials to FMR.
  
 +
==Obtaining the Oracle Connector Dependency==
 +
FMR supports the 'ojdbc8' Thin JDBC Driver with Java JRE / JDK versions 1.8 or higher.<br>
  
==Obtaining the MySql Connector Dependency==
+
The driver consists of a single ‘jar’ file: 'ojdbc8.jar'. <br>
To enable FMR and a MySQL database to communicate the depdendency '''MySQL Connector/J''' version 8.0.29 (or higher) is required. This is a Jar file of approximately 2.5 Mb in size and called: '''mysql-connector-java-8.0.29.jar'''
 
  
This jar can be obtained from the MySQL Web site. At the time of writing this article [https://dev.mysql.com/downloads/connector/j/ this link will take you to the appropriate page] or alternatively you can obtain it from [https://mvnrepository.com/artifact/mysql/mysql-connector-java/8.0.30 Maven Central].
+
The ‘jar’ file is not included as part of the FMR distribution so must be obtained and installed separately prior to starting the application.<br>
 
 
=== Obtaining the Jar file from the MySQL website ===
 
  
 +
‘ojdbc8.jar’ can be downloaded from Oracle using the following link (accurate at the timne of writing this article). Download [https://www.oracle.com/technetwork/database/features/jdbc/jdbc-ucp-122-3110062.html| Oracle odbc8.jar.]
  
 +
==Driver Installation==
 +
The ‘ojdbc8.jar’ must be supplied via the Java CLASSPATH.<br>
  
 +
The recommended option is to add the filesystem location of the ‘ojdbc8.jar’ to the CLASSPATH of the application server. If using Apache Tomcat, this can be done by setting the CLASSPATH environment in the Tomcat ~/bin/setenv.sh script. <br>
  
==Driver Requirements ==
+
For example:
FMR supports the ‘ojdbc8’ Thin JDBC Driver with Java JRE / JDK versions 1.8 or higher.<br>
+
  CLASSPATH=/home/oracle/jdbc/ojdbc8.jar
 +
where /home/oracle/jdbc is the directory containing the ‘ojdbc8.jar’ file.
  
The driver consists of a single ‘jar’ file: ‘ojdbc8.jar’. <br>
+
= Connection Details =
 
+
FMR requires a database to be specified on the first page of the Install Wizard.  This can be changed at a later from the Administrator "Database Settings" page.
The ‘jar’ file is not included as part of the FMR distribution so must be obtained and installed separately prior to starting the application.<br>
 
  
‘ojdbc8.jar’ can be downloaded from Oracle using the following link (accurate at the timne of writing this article). Downlaod [https://www.oracle.com/technetwork/database/features/jdbc/jdbc-ucp-122-3110062.html| Oracle odbc8.jar.]
+
Oracle by default uses port 1521.  
  
==Driver Installation==
+
If you wish to make a custom connection to Oracle, the information you will likely need is:
The ‘ojdbc8.jar’ must be supplied via the Java CLASSPATH.<br>
 
  
The recommended option is to add the filesystem location of the ‘ojdbc8.jar’ to the CLASSPATH of the application server. If using Apache Tomcat, this can be done by setting the CLASSPATH environment in the Tomcat ~/bin/setenv.sh script. <br>
+
{| class="wikitable" style="vertical-align:top; text-align:left;"
 +
! Connection String
 +
|| Of the form:
 +
jdbc:oracle:thin:@server url>:<server port>/<oracle schema>
 +
<br/>
 +
e.g. jdbc:oracle:thin:@localhost:1521/orcl12c
 +
|-
 +
! Dialect
 +
|| org.hibernate.dialect.Oracle10gDialect
 +
|-
 +
! Class Name
 +
|| oracle.jdbc.driver.OracleDriver
 +
|}
  
For example:<br>
+
Custom Strings can be as complex as your require. Here are some examples of more complicated Custom Strings:
  
CLASSPATH=/home/oracle/jdbc/ojdbc8.jar<br>
+
  jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl12c)))
  
..where /home/oracle/jdbc is the directory containing the ‘ojdbc8.jar’ file.<br>
+
  jdbc:oracle:thin:@ (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE=off) (FAILOVER = ON) (ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)) )  (CONNECT_DATA=(SERVER=dedicated)(SERVICE_NAME=orcl12c) ) )

Revision as of 05:12, 23 March 2024

Overview

Oracle may be used to act as the persistant store for Registry information. However the JDBC driver that communicates from the Registry to an Oracle instance is not provided within FMR and must be obtained by a Systems Administrator.

Obtaining and Specifying the Oracle JDBC Driver

To get FMR to communicate succesfully with an Oracle database, there are three tasks to perform:

  1. Obtain the correct dependency file
  2. Supply this to your Java Web Server (e.g. Tomcat) that you are using to run FMR.
  3. Specify the appropriate Credentials to FMR.

Obtaining the Oracle Connector Dependency

FMR supports the 'ojdbc8' Thin JDBC Driver with Java JRE / JDK versions 1.8 or higher.

The driver consists of a single ‘jar’ file: 'ojdbc8.jar'.

The ‘jar’ file is not included as part of the FMR distribution so must be obtained and installed separately prior to starting the application.

‘ojdbc8.jar’ can be downloaded from Oracle using the following link (accurate at the timne of writing this article). Download Oracle odbc8.jar.

Driver Installation

The ‘ojdbc8.jar’ must be supplied via the Java CLASSPATH.

The recommended option is to add the filesystem location of the ‘ojdbc8.jar’ to the CLASSPATH of the application server. If using Apache Tomcat, this can be done by setting the CLASSPATH environment in the Tomcat ~/bin/setenv.sh script.

For example:

 CLASSPATH=/home/oracle/jdbc/ojdbc8.jar

where /home/oracle/jdbc is the directory containing the ‘ojdbc8.jar’ file.

Connection Details

FMR requires a database to be specified on the first page of the Install Wizard. This can be changed at a later from the Administrator "Database Settings" page.

Oracle by default uses port 1521.

If you wish to make a custom connection to Oracle, the information you will likely need is:

Connection String Of the form:

jdbc:oracle:thin:@server url>:<server port>/<oracle schema>
e.g. jdbc:oracle:thin:@localhost:1521/orcl12c

Dialect org.hibernate.dialect.Oracle10gDialect
Class Name oracle.jdbc.driver.OracleDriver

Custom Strings can be as complex as your require. Here are some examples of more complicated Custom Strings:

 jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl12c)))
 jdbc:oracle:thin:@ (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE=off) (FAILOVER = ON) (ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)) )  (CONNECT_DATA=(SERVER=dedicated)(SERVICE_NAME=orcl12c) ) )