Apache Ambari Installation
Also available as:
PDF
loading table of contents...
Switching to an Oracle Database After Installation

About This Task

If you want to use an Oracle database with SAM or Schema Registry after you have performed your initial HDF installation or upgrade, you can switch to an Oracle database. Oracle databases 12c and 11g Release 2 are supported

Prerequisites

You have an Oracle database installed and configured.

Steps

  1. Log into Ambari Server and shut down SAM or Schema Registry.

  2. From the configuration screen, select Oracle as the database type and provide Oracle credentials, the JDBC connection string and click Save.

  3. From the command line where Ambari Server is running, register the Oracle JDBC driver jar:

    sudo ambari-server setup --jdbc-db=oracle --jdbc-driver=/usr/share/java/ojdbc.jar
  4. From the host where SAM or Schema Registry are installed, copy the JDBC jar to the following location, depending on which component you are updating.

     cp ojdbc6.jar /usr/hdf/current/registry/bootstrap/lib/.
     cp ojdbc6.jar /usr/hdf/current/streamline/bootstrap/lib/.
    
  5. From the host where SAM or Schema Registry are installed, run the following command to create the required schemas for SAM or Schema Registry.

    export JAVA_HOME=/usr/jdk64/jdk1.8.0_112 ; source /usr/hdf/current/streamline/conf/streamline-env.sh ; /usr/hdf/current/streamline/bootstrap/bootstrap-storage.sh create
    
    export JAVA_HOME=/usr/jdk64/jdk1.8.0_112 ; source /usr/hdf/current/registry/conf/registry-env.sh ; /usr/hdf/current/registry/bootstrap/bootstrap-storage.sh create
    
    [Note]Note

    You only this command run once, from a single host, to prepare the database.

  6. Confirm that new tables are created in the Oracle database.

  7. From Ambari, restart SAM or Schema Registry.

  8. If you are specifying an Oracle database for SAM, run the following command after you have restarted SAM.

    export JAVA_HOME=/usr/jdk64/jdk1.8.0_112 ; source /usr/hdf/current/streamline/conf/streamline-env.sh ; /usr/hdf/current/streamline/bootstrap/bootstrap.sh
    
  9. Confirm that Sam or Schema Registry are available and turn off maintenance mode.