Hive supports multiple databases. This section uses Oracle as an example. To use OracleDB as the Hive Metastore database, you must have already installed HDP and Hive.
To set up Oracle for use with Hive:
On the Hive Metastore 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.
Select "Oracle Database 11g Release 2 - ojdbc6.jar"
Copy the .jar file to the Java share directory:
cp ojdbc6.jar /usr/share/java
Note Make sure the .jar file has the appropriate permissions - 644.
Create a user for Hive and grant it permissions using SQL*Plus, the Oracle database admin utility:
# sqlplus sys/root as sysdba CREATE USER $HIVEUSER IDENTIFIED BY $HIVEPASSWORD; GRANT SELECT_CATALOG_ROLE TO $HIVEUSER; GRANT CONNECT, RESOURCE TO $HIVEUSER; QUIT;
Where $HIVEUSER is the Hive user name and $HIVEPASSWORD is the Hive user password.