3.8.3 Oracle RAC Connection

The following steps are applicable when using Oracle RAC: 

  1. Go to the "Oracle Database Software Downloads" web page: 
    http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html.
  2. Find the Oracle database version 12 download links for your operating system. Click See All.
  3. On the next page, search for "Oracle Database <version> Client” and click on the link to download the zip file.
  4. Unzip the file in an installation directory and install by entering the command: ./runInstall
     
  5. During installation, take extra notice to the following parts:
    1. In the Available Product Components dialog, select "Oracle JDBC/THIN Interfaces" and "Oracle Connection Manager".
    2. In the Perform Prerequisite Checks dialog, tick the box "Ignore All".
  6. After a successful installation, go to the installation directory and enter the following commands to find the ons.jar and ojdbc<version>.jar files: 
    $ find . -name ons.jar
    $ find . -name ojdbc*.jar 
     
  7. Store ons.jar and ojdbc<version>.jar in a directory that is available on the Platform Container host.
  8. Run the the following command to install Oracle drivers and to configure the Oracle connection parameters:

    $ ./setup.sh configure_oracle

    Note!

    The above command will ask for the user to input to the Oracle driver directory. It can also be passed as an argument by running the command as follows:

    ./setup.sh -Dmz.3pp.dir=/oracle/jdbc/driver/dir configure_oracle
  9. Set the url property of the standard service storage-dispatcher.

    mzsh topo set topo://services:standard/val:storage-dispatcher.storage-dispatcher1.\
    config.url "<jdbc connection string>"

    Example - JDBC connection string

    mzsh topo set topo://services:standard/val:storage-dispatcher.storage-dispatcher1.\
    config.url '
    jdbc:oracle:thin:@
    (description=(address_list=
    (address=(host=10.0.0.111)(protocol=tcp)(port=1521))
    (address=(host=10.0.0.112)(protocol=tcp)(port=1521))
    (load_balance=no))(connect_data=(service_name= orcl)))'
  10. In order for Fast Connection Failover, FCF, to work, the ONS must be configured in the database as well as in  . This is done by setting the property mz.jdbc.oracle.ons in the storage-dispatcher service configuration. This property should contain the information found in the ONS configuration file ORACLE_HOME/opmn/conf/ons.config.

    The ONS string in the property must at least specify the node's ONS configuration attribute, that is the host:port pairs preceded by the text "node=" and separated by a comma (,). The hosts and ports denote the remote ONS daemons available on the Oracle RAC nodes.
     

    Example - Setting mz.jdbc.oracle.ons

    $ mzsh topo set topo://services:standard/val:storage-dispatcher.storage-dispatcher1.config.db-properties.mz.jdbc.oracle.ons '
    nodes=10.0.0.85:6300,10.0.0.86:6300'