1.1. Using Ambari with Oracle
To set up Oracle for use with Ambari:
On the Ambari Server host, install the appropriate
JDBC.jar
file.Download the Oracle JDBC (OJDBC) driver from http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html.
For Oracle Database 11g: select
Oracle Database 11g Release 2 drivers > ojdbc6.jar
.For Oracle Database 12c: select
Oracle Database 12c Release 1 drivers > ojdbc7.jar
.Copy the .jar file to the Java share directory. For example:
cp ojdbc7.jar /usr/share/java/
Make sure the .jar file has the appropriate permissions. For example:
chmod 644 /usr/share/java/ojdbc7.jar
Create a user for Ambari and grant that user appropriate permissions.
For example, using the Oracle database admin utility, run the following commands:
# sqlplus sys/root as sysdba
CREATE USER <AMBARIUSER> IDENTIFIED BY <AMBARIPASSWORD> default tablespace “USERS” temporary tablespace “TEMP”;
GRANT unlimited tablespace to <AMBARIUSER>;
GRANT create session to <AMBARIUSER>;
GRANT create TABLE to <AMBARIUSER>;
GRANT create SEQUENCE to <AMBARIUSER>;
QUIT;
Where <AMBARIUSER> is the Ambari user name and <AMBARIPASSWORD> is the Ambari user password.
Load the Ambari Server database schema.
You must pre-load the Ambari database schema into your Oracle database using the schema script.
sqlplus
<AMBARIUSER>/<AMBARIPASSWORD>
< Ambari-DDL-Oracle-CREATE.sql
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.