Administering Ambari
Also available as:
PDF
loading table of contents...

Using Ambari with Oracle

Before setting up Ambari Sever with an existing Oracle database; obtain the appropriate drivers and .jar files, create an Ambari user with sufficient permissions, and load the Ambari database schema.

Determine the appropriate Oracle database version and obtain the release drivers and .jar file.
Table 1. Oracle Datbase Version Information
Oracle Database Version Drivers File
Oracle Database 11g Oracle Database 11g Release 2 drivers ojdbc6.jar
Oracle Database 12c Oracle Database 12c Release 1 drivers ojdbc7.jar
  1. On the Ambari Server host, stage the appropriate JDBC driver file for later deployment.
    1. Download the Oracle JDBC (OJDBC) driver from https://www.oracle.com/technetwork/database/application-development/jdbc/downloads/index.html.
    2. Copy the .jar file to the Java share directory.
      cp ojdbc7.jar /usr/share/java/
    3. Make sure the .jar file has the appropriate permissions.
      chmod 644 /usr/share/java/ojdbc7.jar
  2. Create a user for Ambari and grant that user appropriate permissions.
    using the Oracle database admin utility, run the following commands:
    # sqlplus sys/root as sysdba
    CREATE USER [AMBARI_USER] IDENTIFIED BY [AMBARI_PASSWORD] default tablespace "USERS" temporary tablespace "TEMP";
    GRANT unlimited tablespace to [AMBARI_USER];
    GRANT create session to [AMBARI_USER];
    GRANT create TABLE to [AMBARI_USER];
    GRANT create SEQUENCE to [AMBARI_USER];
    QUIT;
    Where [AMBARI_USER] is the Ambari user name and [AMBARI_PASSWORD] is the Ambari user password.
  3. Load the Ambari Server database schema.
    1. You must pre-load the Ambari database schema into your Oracle database using the schema script.
      sqlplus [AMBARI_USER]/[AMBARI_PASSWORD] Ambari-DDL-Oracle-CREATE.sql
    2. Find the Ambari-DDL-Oracle-CREATE.sql file in the /var/lib/ambari-server/resources/ directory of the Ambari Server host after you have installed Ambari Server.
When setting up the Ambari Server, select Advanced Database Configuration ] Option [2] Oracle and respond to the prompts using the username/password credentials you created in step 2.