Page 1 of 1

SQLGetPrivateProfileString

Posted: Tue Oct 30, 2012 8:00 pm
by tbradley1015
I've seen the few threads about NoSQLGetPrivateProfileString messages but I think I have a different issue. I'm trying to establish an odbc connection from a perl script and it's failing with this error.

[Vertica][ODBC] (11560) Unable to locate SQLGetPrivateProfileString function

I had the other issue about not finding the message for the en_US locale but that was fixed with the vertica.ini file. So it's finding the message in ODBCMessages.xml but i don't know why its actually throwing that error. Any ideas about this one?

Re: SQLGetPrivateProfileString

Posted: Tue Oct 30, 2012 10:00 pm
by id10t
Hi!

>> I have a different issue
No, you have same issue - odbc driver do not know where error messages are.

>> I had the other issue about not finding the message for the en_US locale
vertica.ini should solve this issue but the problem not in LOCALE, problem in ErrorMessagesPath.
You should define path to ODBCMessages.xml (which is error messages file) in connection string.

Re: SQLGetPrivateProfileString

Posted: Wed Oct 31, 2012 4:18 pm
by tbradley1015
Its definitely finding ODBCMessages.xml because I added XXX to the message text in the file and now its displaying the text that I changed.

DBI connect('TCCVRTS1','',...) failed: [unixODBC][Vertica][ODBC] (11560) Unable to locate XXXSQLGetPrivateProfileString function. (SQL-HY000) at tom_vertica.pl line 87

Any other suggestions?

Re: SQLGetPrivateProfileString

Posted: Thu Nov 01, 2012 6:53 pm
by JimKnicely
Hi,

Did you set up the VERTICAINI environment variable?

Thanks!

Re: SQLGetPrivateProfileString

Posted: Fri Nov 02, 2012 4:27 pm
by tbradley1015
VERTICAINI is set.

ux411:/mks/tcc/ort/bin/shell > more $VERTICAINI
[Driver]
Locale = en_US
ODBCInstLib = /apps/local/unixODBC/lib/libodbcinst.so.1
ErrorMessagesPath = /apps/vertica/odbc/lib64/
DriverManagerEncoding = UTF-8
LogPath = /tmp
LogLevel = 7

Re: SQLGetPrivateProfileString

Posted: Fri Nov 02, 2012 4:54 pm
by JimKnicely
Hi,

Here's my ini file:

[root@HADOOPTST01 jknicely]# cat /etc/vertica.ini
[Driver]
DriverManagerEncoding=UTF-16
ODBCInstLib=/usr/lib64/libodbcinst.so
ErrorMessagesPath=/opt/vertica/lib64
LogLevel=4
LogPath=/tmp

Are you sure about the ErrorMessagesPath setting in your ini file?

Re: SQLGetPrivateProfileString

Posted: Fri Nov 09, 2012 10:08 pm
by tbradley1015
Thanks all. The problem was the wrong directory for the odbclib

I had the 32bit version. Once I changed it to the 64bit version everything is ok.

ODBCInstLib = /apps/local/unixODBC_64/lib/libodbcinst.so.1