Skip to Content
Former Member
Nov 23, 2016 at 11:32 PM

Reading HANA table from R Memory Error



I want to read information from a HANA DB, from R using RODBC.

I have a server with SLES 11 runing R 2.15, RODBC(1.3) , and HANA Client installed, and a HANA Server (V 85.04).

I have edited the etc/odbc.ini file, and can successfully query the HANA server via isql.

In R I can successfully create a connection to the HANA server using a connection string as following:

> ch <-  odbcDriverConnect("DSN=hana;SERVERNODE=###.##.##.##:30015;UID=MYUSER;PWD=MYPASSWORD")

But when sending a query to HANA I get the following error:

a <- odbcQuery(ch,'SELECT TOP 100 * FROM "MY_TABLE"')
Error in odbcQuery(ch, "SELECT TOP 100 * FROM \"MY_TABLE\"") : 
  Calloc could not allocate memory (18446744073709551616 of 22816 bytes)

The error suggest im trying to allocate 18000 peta byte of memory which is insane.

Has someone encountered this error? How can it be fixed?

I have been able to use this R server from HANA using the CREATE PROCEDURE.... R LANG etc.... way and also have been able to successfully extract data from HANA using the exact R comands from my local windows 7 machine.