Hive uses a default H2 database instance bundled with BAM to persist Hive table definitions and other metadata. In production setups, we recommend to use a separate database instance such as MySQL, Oracle etc. instead of the default H2 database. Change the following properties to point to the external database instance.
<property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:h2://${CARBON_HOME}/repository/database/metastore_db</value> <description>JDBC connect string for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>org.h2.Driver</value> <description>Driver class name for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionUserName</name> <value>wso2carbon</value> <description>username to use against metastore database</description> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>wso2carbon</value> <description>password to use against metastore database</description> </property>
For databases other than H2, add the database driver to <BAM_HOME>/repository/components/lib and restart the server.