2. Configure Hive when Metastore DB is in a Named Instance (MS SQL Only)

When using MS SQL for the Hive metadata store and the Hive database is not in the default instance (that is it is in a named instance), you must configure the connection string after the installation completes as follows:

  1. On the Hive host, open the hive-site.xml in a text editor.

  2. Add the instance name to the property of the connection URL:

    <property>
      <name>javax.jdo.option.ConnectionURL</name>
      <value>jdbc:sqlserver://$sql-host/$instance-name:port/$hive_db;create=true</value>
      <description>JDBC connect string for a JDBC metastore</description>
    </property>

    where the value contains the following environment specific information:

    • $sql-host: SQL server host name

    • $instance-name: the name of the instance that the Hive database is in

    • $hive_db: the name of the Hive database

  3. Save the changes to hive-site.xml.

  4. Finish configuring Hive as described in the following section before restarting the Apache Hadoop Hive service.


loading table of contents...