Hive / HCatalog Forum

ODBC Error Could not SQLConnect

  • #58122
    Ed Perry

    I have been trying to get the ODBC Drivers working on the sandbox and it just does not seem to be working for me.
    I can connect to the port via JDBC/Squirrel but can’t seem to get the ODBC driver working .

    I am getting an error

    [endeca@sandbox ~]$ isql -v -d HIVE
    [S00][nxDC[otnok]OB](16)Ual olct QGtrvtPoietigfnto. SQLGetPrivateProfileString function.
    [ISQL]ERROR: Could not SQLConnect

    I tried with both


    [endeca@sandbox ~]$ more ~/.odbc.ini
    # Specify any global ODBC configuration here such as ODBC tracing.

    [ODBC Data Sources]


    # Description: DSN Description.
    # This key is not necessary and is only to give a description of the data source.
    Description=Hortonworks Hive ODBC Driver (64-bit) DSN

    # Driver: The location where the ODBC driver is installed to.

    # The DriverUnicodeEncoding setting is only used for SimbaDM
    # When set to 1, SimbaDM runs in UTF-16 mode.
    # When set to 2, SimbaDM runs in UTF-8 mode.

    # Values for HOST, PORT, KrbHostFQDN, and KrbServiceName should be set here.
    # They can also be specified on the connection string.
    #KrbHostFQDN=[Hive Server 2 Host FQDN]
    #KrbServiceName=[Hive Server 2 Kerberos service name]

    What am I doing wrong? Oh and this is just the Sandbox I download last month.

    [endeca@sandbox ~]$ uname -a
    Linux 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
    [endeca@sandbox ~]$ more /etc/redhat-release
    CentOS release 6.5 (Final)

to create new topics or reply. | New User Registration

  • Author
  • #58123
    Ed Perry

    Oh and all the libraries match

    [endeca@sandbox ~]$ ldd /usr/lib/hive/lib/native/Linux-amd64-64/ => (0x00007fffedb2b000) => /lib64/ (0x00007fa872c6d000) => /lib64/ (0x00007fa872a50000) => /usr/lib64/ (0x00007fa872835000) => /lib64/ (0x00007fa87262d000) => /usr/lib64/ (0x00007fa872327000) => /lib64/ (0x00007fa8720a2000) => /lib64/ (0x00007fa871e8c000) => /lib64/ (0x00007fa871af8000)
    /lib64/ (0x00007fa8752fb000) => /lib64/ (0x00007fa8718dd000) => /lib64/ (0x00007fa8716a6000) => /lib64/ (0x00007fa87142f000)

    Jason Shih

    I have same error from RH6 due to default unixODBC installed.
    you might consider rebuilding latest unixODBC (2.3) from your server and launch isql refer to new installed binary.


    Ed Perry

    Thanks, but figured it out (mostly) it was the hortonworks.hive.ini the example file for odbcUnix is bad.
    It says to comment one of these lines

    I thought this was some configuration syntax but it was not, it needs to be this (or similar). But that is wrong

    Once I did that it connects just fine. Though Error messages still seem corrupt but I think that is a Locale issue

    Hope this helps

You must be to reply to this topic. | Create Account

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.