Unable to locate SQLGetPrivateProfileString function
Dear people,
When I try a:
library(vRODBC)
connect <- odbcConnect("VerticaDSN")
I get the following error:
Warning messages:
1: In odbcDriverConnect("DSN=VerticaDSN") :
[vRODBC] ERROR: state HY000, code 11560, message [unixODBC][Vertica][ODBC] (11560) Unable to locate SQLGetPrivateProfileString function.
2: In odbcDriverConnect("DSN=VerticaDSN") : ODBC connection failed
Now I've searched everywhere on the internet for solutions as well as the docs provided by HPE, but never do I find a solution that works for me.
Now I know that it's related to the two .ini files you need to create, so first I'll show those:
/etc/odbc.ini
[ODBC Data Sources]
VerticaDSN = "Vertica"
[VerticaDSN]
Description = DSN for Vertica
Driver = /opt/hp/odbc/lib64/libverticaodbc.so
Database = VMart
Servername = localhost
UserName = dbadmin
Password = <omitted>
Port = 5433
ConnSettings =
Locale = en_US
[Driver]
DriverManagerEncoding = UTF-16
ODBCInstLib = /usr/lib/x86_64-linux-gnu/libodbcinst.so
ErrorMessagesPath = /opt/vertica/lib64
LogLevel = 0
LogPath = /tmp
/etc/vertica.ini
[Driver]
DriverManagerEncoding = UTF-16
ODBCInstLib = /usr/lib/x86_64-linux-gnu/libodbcinst.so
ErrorMessagesPath = /opt/vertica/lib64
LogLevel = 0
LogPath = /tmp
Both the system variables for $VERTICAINI and $ODBCINI are set and also in the .bashrc, as well as the Renviron has been set to:
VERTICAINI=/etc/verticaini.ini
ODBCINI=/etc/odbc.ini
Secondly, the paths that need to resolve to an actual file are all correct, as in, the file is actually in the place as listed in both .ini's.
The path for ErrorMessages also leads to a folder containing an en-US folder with in the folder the file ODBCMessages.xml.
I honestly do not how to solve it. Anybody who can help me with this?
(I'm running Ubuntu 14.04 LTS)
Comments
HI,
Can you share me the output of
- ls -l /opt/vertica/lib64/libverticaodbc.sostrings /opt/vertica/lib64/libverticaodbc.so | grep SQLGetPrivateProfileStringls -l /usr/lib64/*odbc
Can you check if there is another odbc.ini file in your system apart from the one present in /etc??
Thank you,
Sruthi
Hey, first of all thanks for the quick reply,
the result of ls -l /opt/vertica/lib64/libverticaodbc.sostrings /opt/vertica/lib64/libverticaodbc.so | grep SQLGetPrivateProfileStringls -l /usr/lib64/*odbc is:
I don't know if the trailing dash (-) is neccessary, but if so: here's the output with dash:
Then secondly, a locate for odbc.ini gives me:
So yes, there's a lot of other odbc.ini's. Similarly for vertica.ini:
But that seems to be allright.
Is this helpfull?
Best regards,
Fred
Hi,
Can you share me the content of /etc/odbc.ini
Sruthi
The contents for odbc.ini are in the openingspost! (As well as the vertica.ini fyi)
For your ease though:
/etc/odbc.ini
Hi,
Thanks for the file. What is the value of ODBCINI environment variable??
Sruthi
They are as follows:
Many thanks in advance.
After some tweaking left and right I now got the following message in RStudio when trying to connect. (Same with isql btw)
Warning messages:
1: In odbcDriverConnect("DSN=VerticaDSN") :
[vRODBC] ERROR: state 08001, code 10380, message [unixODBC][Vertica][ODBC] (10380) Unable to establish a connection with data source. Missing settings: {[Database] [ServerName]}
2: In odbcDriverConnect("DSN=VerticaDSN") : ODBC connection failed
Even though the database and servername are actually set (See the first post of this thread).
I made the example database of VMart.
If I change the DSN to something that doesn't exist in odbc.ini it throws me the error that it can't find the specified DSN, so at least it's reading the right ODBC.ini file.
Hi,
Could you please change DRIVER to opt/vertica/lib64/libverticaodbc.so in odbc.ini and try connecting to database?
Thank you,
Sruthi
I tried to and it lead to the following error:
Similar error in RStudio.
So sadly it had no result so far.
So, currently I have the following:
/etc/odbc.ini
/etc/vertica.ini
and the system variables are as follows:
echo $VERTICAINI
echo $ODBCINI
echo $LD_LIBRARY_PATH
The database in my system is the example from the installation guide provided with Vertica.
Also some locate's:
locate odbc.ini
locate vertica.ini
locate libverticaodbc.so
locate libodbcinst.so
I'm honestly lost and have no clue where to search anymore.
I tried all the steps provided in the following guide (exactly as written down):
http://www.vertica.com/wp-content/uploads/2014/06/vRODBC-Installation-Guide.pdf
Also on one of the nodes that was still untouched in regards to the RODBC or unixODBC files but sadly this didn't work either and resulted in the same error.
Is there anybody that could possibly help?
Honestly nobody that has a clue what is going on?
Anybody that got this working then on an Ubuntu 14.04 LTS install with the latest version of UnixODBC from the website? (So not the package included with DistR)
Or perhaps anybody that can point me to an install guide for vRODBC that has worked for them?
This is what the log has to say about the failing connection by the way:
It seems to me that the values are supposed to actally be read, but instead they are all empty.
I am also facing the same problem.
Is there anyone to help us out from this issue.
Many thanks in advance,
Kalpesh
Hi,
Are there any other packages installed in your server , by default installed ODBC Driver. Please map obdcinstlib to correct
which was created when you installed vertica ODBC driver.
Sruthi
Thanks for your response.
But this file is not present in my server.
Would you please help me to do needful.
Thanks,
Kalpesh
Hi Kalpesh
'm installing Vertica for the first time today, maybe later to answer but I fix this issue installing the package unixodbc-dev.
My Setup is a Ubuntu 14
Regards