Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagehtml/xml
<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>
Info
iconfalse

In production setups, we recommend to use an external database instance such as MySQL, MSSQL, Oracle or Derby, instead of the embedded H2 database. For databases other than H2, you need to create the metastore_db database, while in H2 it is being created. Change the<BAM_HOME>/repository/conf/advanced/hive-site.xml file to point to the external database instance created. If you are on Windows, use the hive-site-win.xml file in the same folder.

For example, the following code connects to an external Oracle database as the Hive metedata store:

Code Block
languagexml
<property>
  <name>javax.jdo.option.ConnectionURL</name>
  <value>jdbc:oracle:thin:@<ip>:<port>:<SID></value>
  <description>JDBC connect string for a JDBC metastore</description>
</property>
 
<property>
  <name>javax.jdo.option.ConnectionDriverName</name>
  <value>oracle.jdbc.driver.OracleDriver</value>
  <description>Driver class name for a JDBC metastore</description>
</property>
 
<property>
  <name>javax.jdo.option.ConnectionUserName</name>
  <value><USERNAME></value>
  <description>username to use against metastore database</description>
</property>
 
<property>
  <name>javax.jdo.option.ConnectionPassword</name>
  <value><PASSWORD></value>
  <description>password to use against metastore database</description>
</property>
Info
For databases other than H2, add the database driver to <BAM_HOME>/repository/components/lib and restart the server.