The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

Hive / HCatalog Forum

[ODBC] HY001 Memory Allocation

  • #29137
    owen rumney


    I’ve installed the 32Bit ODBC driver from your site using the instructions from the same page and I’m getting a memory allocation error when I connect to the correct host.

    If I put a known wrong host it gives me a sensible error, however when the correct one is used I’m just getting the HY001 memory allocation and no further logs or events to work with.

    Is this a known issue that there is a workaround for? I need to connect HIVE using ODBC one way or anoher.


  • Author
  • #29432

    Hi Owen,

    Sorry about the delay in getting back to you here. I was hoping that someone out there is forum land knew the answer, but I guess not. I’ll do some digging/asking around to hunt one down for you.


    owen rumney

    Hi Ted

    Thanks, I’d begun to lose hope. It’s a critical component in our design so if I can’t find a resolution it rather undermines out use of HDP for Windows.

    In the meantime, I’m trying to see if I can use a Sqoop export to get the same result.


    Carter Shanklin

    Owen what client are you connecting with?

    I believe HDP for Windows only has HiveServer1 at this stage, are you connecting as HS1 or HS2?

    owen rumney

    Hi Carter

    I’m connecting to Hive Server 1 with no authenication and the default port of 10000.

    Specific error is;

    Driver Version: V1.2.0.1005
    Running connectivity tests…
    Attempting connection
    Failed to establish connection
    SQLSTATE: HY001[Hortonworks][ODBC] (10010) Memory allocation error: std::bad_alloc exception is caught.


    Carter Shanklin

    Owen, I was corrected by one of my colleagues that it is in fact Hive Server 2 on HDP / Win.

    What app are you using to connect? It might require the 64 bit driver. I know Tableau is one exception that requires 32 bit but I’m not aware of any others.

    owen rumney

    Ultimately I want to connect to hive from MS SQL and bring in data that way.

    The error I am getting is thorough the ODBC administrator in Windows.

    Interesting that you mention tableau, that is on my critical path later on.

    I’ll give hive server 2 a go, but I think that had an error as well. Will update tomorrow.


    Seth Lyubich

    Hi Owen,

    I just wanted to check if you were able to test with the Hive Server 2? Also, can you please try with 64 bit driver as recommended in documentation?

    You can use instructions below that describe how query data from Hive through Microsoft Excel. Instructions for SQL server should be the same:

    On the client machine where you will run Microsoft Excel:

    Download the Windows 64-bit Hortonworks ODBC driver from here.

    Execute the MSI and follow the instructions to install the ODBC driver.

    Set up an ODBC DSN using the following instructions:

    For 64-bit ODBC driver: Open the 64-bit ODBC Administrator pane.

    Navigate to the System DSN tab.

    Click Add, select the Hortonworks Hive driver and click Finish.

    Configure the driver using the following instructions:

    Under Host, provide the hostname of the cluster node that runs the Apache Hadoop hiveserver2 service.

    Under Port, enter the port of the Hive Server 2 service. By default, the Hive Server port is set to 10001.

    Choose Username for authentication, and enter ‘Hadoop’ as the user name.

    Click Ok.

    You can now use this ODBC DSN from Excel, to see tables in Hive and pull data from these tables.

    Also, some additional resources can be found here:

    Please let us know if this is helpful.


    owen rumney

    Hi Seth

    I thought I’d put a reply with all of the errors for each of the configurations I’d tried, seems it didnt’ save.

    I’ve tried your recent suggestion and when testing the DSN I gett the following error;

    SQLSTATE: HY000 [Hortonworks][Hardy](34) Error from Hive: connect() failed: errno = 10060

    I’ve checked the ports and 10001 is open as well as 10000 (which was what I though the documentation said was the default port!)

    Thanks anyway


    Hi Owen,
    There should a odbc client called beeline on the your hiveserver2 node. If you try using this client to connect, I wonder if you are able to connect. This will hopefully isolate if the issue is on the server or client side. Here are the instructions for the command line for beeline:

    which is for linux, but I believe should apply.

    Let me know if this helps.



    Hi all
    I am getting the same error when using the ODBC driver
    “Attempting connection
    Failed to establish connection
    SQLSTATE: HY001[Hortonworks][ODBC] (10010) Memory allocation error: std::bad_alloc exception is caught.


    I tried the steps mentioned by Robert and my beeline seems to be working fine, at least I can do show tables and they show up correctly. However, I still cannot make the ODBC driver work

    Any other ideas?


    Actualy I take that back. It actually worked!

    Sasha J

    Good to know you got it working!
    Thank you!

The forum ‘Hive / HCatalog’ is closed to new topics and replies.

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.