Page 1 of 2
Invalid User or Password Error
Posted: Thu Jul 12, 2012 4:27 pm
by Julie
Me again...
I'm trying to configure a Vertica 6 ODBC connection on Linux. I've already installed the driver. I believe I have everything set up properly but I get an error testing a connection with
isql:
Code: Select all
[root@verticatst01 etc]# isql -v vertica_test
[28000][unixODBC]FATAL 3781: Invalid username or password
[ISQL]ERROR: Could not SQLConnect
Here is my
odbc.ini file:
Code: Select all
[root@verticatst01 etc]# cat /etc/odbc.ini
[vertica_test]
Description = Warehouse Database
Driver = /opt/vertica/lib64/libverticaodbc.so
Database = vtest
Servername = verticatst01
UID = dbadmin
PWD =
Port = 5433
ConnSettings =
Locale = en_GB
I can connect okay with
vsql using the username
dbadmin with no password:
Code: Select all
[root@verticatst01 etc]# /opt/vertica/bin/vsql -U dbadmin
Welcome to vsql, the Vertica Analytic Database 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
dbadmin=>
Does anyone see anything obvious that I'm missing here as to why I am getting an invalid user name or password error with
isql but not
vsql?
Thanks a bunch!
Re: Invalid User or Password Error
Posted: Thu Jul 12, 2012 6:38 pm
by id10t
Hi Julie!
1) Did you configure vertica.ini ---
viewtopic.php?f=21&t=287&p=827 ?
2) in PWD field write your Linux dbadmin password.
3) Remove blank settings like ConnSettings
Re: Invalid User or Password Error
Posted: Thu Jul 12, 2012 7:25 pm
by Julie
sKwa,
I used the odbc settings from the example in the Vertica 6 Programmer's Guide (page 30) as a template:
[VMart]
Description = Vmart Database
Driver = /opt/vertica/lib64/libverticaodbc.so
Database = vmartdb
Servername = host01
UID = dbadmin
PWD =
Port = 5433
ConnSettings =
SSLKeyFile = /home/dbadmin/client.key
SSLCertFile = /home/dbadmin/client.crt
Locale = en_GB
Anyway, I tried getting rid of the blanks:
Code: Select all
[root@verticatst01 ~]# cat /etc/odbc.ini
[vertica_test]
Description = Warehouse Database
Driver = /opt/vertica/lib64/libverticaodbc.so
Database = vtest
Servername = verticatst01
UID = dbadmin
Port = 5433
Locale = en_GB
[root@verticatst01 ~]# isql -v vertica_test
[28000][unixODBC]FATAL 3781: Invalid username or password
[ISQL]ERROR: Could not SQLConnect
That didn't work, but then I found another example showing the use of "UserName" instead of "UID". I made that change and now my connection works!
Code: Select all
[root@verticatst01 ~]# cat /etc/odbc.ini
[vertica_test]
Description = Warehouse Database
Driver = /opt/vertica/lib64/libverticaodbc.so
Database = vtest
Servername = verticatst01
UserName = dbadmin
Port = 5433
Locale = en_GB
[root@verticatst01 ~]# isql -v vertica_test
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
Thanks again for your help!
Do you think the documentation is inaccurate? Weird.
Re: Invalid User or Password Error
Posted: Thu Jul 12, 2012 7:59 pm
by id10t
>> Do you think the documentation is inaccurate?
No. It's ODBC issue. Username, UserName and user -
aliases for UID and it should work properly with UID.
Can you provide next:
Code: Select all
uname -a # may be its 32 bit issue?
rpm -q unixODBC # i think that problem is here
rpm -qa | grep vertica # just wanna know your Vertica version
Re: Invalid User or Password Error
Posted: Thu Jul 12, 2012 8:04 pm
by id10t
[UPDATE]
As you can see below on pic UID works.
Re: Invalid User or Password Error
Posted: Thu Jul 12, 2012 8:35 pm
by Julie
sKwa,
Here are the results of the commands:
Code: Select all
[root@verticatst01 ~]# uname -a
Linux verticatst01 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:20 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@verticatst01 ~]# rpm -q unixODBC
unixODBC-2.2.11-10.el5
unixODBC-2.2.11-10.el5
[root@verticatst01 ~]# rpm -qa | grep vertica
vertica-6.0.0-0
knicely87 mentions a bug in the post:
viewtopic.php?f=21&t=62&p=278&hilit=bug#p278
I wonder if I am hitting that one too?
Re: Invalid User or Password Error
Posted: Thu Jul 12, 2012 9:03 pm
by id10t
Hi Julie!
and one more output
Code: Select all
ls -l /opt/vertica/lib64/libverticaodbc.so
Update your Vertica instance to version 6.0.0-1
(or wait a couple days and there will be 6.0.0-2)