Vertica client 5.1.6 - unixODBC error - Database does not exist
Hello,
I recently upgraded 4.1 client & driver to 5.1.6. I am setting up a connection to 6.1.3 server. Connection with vsql client works. However, connecting with isql fails. Appreciate ideas from folks here in resolving this. Below is the error message and also my ODBC setup.
Error with isql:
I recently upgraded 4.1 client & driver to 5.1.6. I am setting up a connection to 6.1.3 server. Connection with vsql client works. However, connecting with isql fails. Appreciate ideas from folks here in resolving this. Below is the error message and also my ODBC setup.
Error with isql:
$ isql -v Vertica6DSN my_user seekritvsql works:
[3D000][unixODBC][Vertica][VerticaDSII] (160) Connection attempt failed: FATAL: Database "public" does not exist
[ISQL]ERROR: Could not SQLConnect
$ vsql -h vertica-01.dev.net -U my_user -w seekritODBC DSN is:
Welcome to vsql, the Vertica Analytic Database v5.1.6-0 interactive terminal.
Type: \h for help with SQL commands
\? for help with vsql commands
\g or terminate with semicolon to execute query
\q to quit
my_user => \d;
List of tables
Schema | Name | Kind | Owner | Comment
--------+-----------+-------+---------+---------
public | regevents | table | dbadmin |
(1 row)
$ cat /etc/odbc.iniVertica.ini file:
[ODBC Data Sources]
[Vertica6DSN]
Driver = /opt/vertica/lib64/libverticaodbc.so
Host = localhost
ServerName = vertica-01.dev.net
Database = public
Port = 5433
TxnReadCommitted = 1
$ cat /etc/vertica.ini
[Driver]
DriverManagerEncoding=UTF-16
ODBCInstLib=/usr/lib64/libodbcinst.so
ErrorMessagesPath=/opt/vertica/lib64
LogLevel=4
LogPath=/tmp
0
Comments
Kindly add below line in your .bashrc profile file & on all nodes in the cluster & then restart the cluster.
export VERTICAINI=/etc/vertica.ini
Once the database is up now try to connect using isql
Regards
Rahul Choudhary
Thanks for responding. I did try setting VERTICAINI env variable, but to no avail. It turns out "public" database really didn't exist after all. Our DBA now provided me the database name to should use. And connection works now. Should have taken the error for what it says.
Regards
Harsha