Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

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:
$ isql -v Vertica6DSN my_user seekrit
[3D000][unixODBC][Vertica][VerticaDSII] (160) Connection attempt failed: FATAL:  Database "public" does not exist
[ISQL]ERROR: Could not SQLConnect
vsql works:
$ vsql -h vertica-01.dev.net -U my_user -w seekrit
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)
ODBC DSN is:
$ cat /etc/odbc.ini

[ODBC Data Sources]

[Vertica6DSN]
Driver     = /opt/vertica/lib64/libverticaodbc.so
Host       = localhost
ServerName = vertica-01.dev.net
Database   = public
Port       = 5433
TxnReadCommitted = 1
Vertica.ini file:
$ cat /etc/vertica.ini 
[Driver]
DriverManagerEncoding=UTF-16
ODBCInstLib=/usr/lib64/libodbcinst.so
ErrorMessagesPath=/opt/vertica/lib64
LogLevel=4
LogPath=/tmp


Comments

  • Hi Harsha

    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
  • Hi Rahul,
    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

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.