On 22/09/2013 22:41, Nagendra Singh wrote:
Hi Martin,
Thanks a bunch for looking into this problem. Here are the details asked
by you:-
PERL Version is v5.10.1
DBI Version is 1.609
DBD::ODBC version is 1.43.
Logs file are attached.
Regards,
Mr. Singh

Thank you for the trace file. Your versions above should be ok.

You DBI_TRACE shows:

!SQLError(26b11a0,26b1320,0) = (82, 0, 523 80)
          ^^^^^^^ environment handle
                  ^^^^^^^ connection handle
                          ^ statement handle
and the (82, 0, 523 80) are:

sql state,
native error,
error message

'82' is not a valid ODBC state - it should be 5 characters.
0 as a native error is unusual but not an error.
'523 80' is peculiar as an error msg.

None of this is enough for me to diagnose any problem other than your ODBC driver seems broken or is perhaps using an incompatible ODBC API (e.g., one where DBD::ODBC was built with SQLLEN as 64 bit and vertica was built with SQLLEN 32 bit).

You will need to contact Vertica I guess. You might want to ask them:

a) why the state is only 2 chrs
b) what error msg '523 80' means
c) whether their ODBC driver was built with 32 bit or 64 bit SQLLEN
   run odbcinst -j on your machine to see how unixODBC was built.
d) include a unixODBC trace - which by the way, the one you sent me was not a unixodbc trace - it was the start of the DBI trace.

Martin
--
Martin J. Evans
Wetherby, UK

*From:* Martin J. Evans <boh...@ntlworld.com>
*To:* Nagendra Singh <nagsu...@yahoo.com>
*Cc:* Michael Nhan <mn...@genome.wustl.edu>; Manimegalai Visvanathan
<mvisvanat...@wsgc.com>; "'dbi-users@perl.org'" <dbi-users@perl.org>
*Sent:* Sunday, September 22, 2013 11:51 AM
*Subject:* Re: DBD::Oracle installation on AIX

On 21/09/2013 19:42, Nagendra Singh wrote:
 > Hi,
 > I have installed DBD::ODBC latest version on 64 bit Linux Machine. One
 > one machine I am able to make connection to Vertica using DSN but on
 > other machine I am getting following error message. My odbc.ini,
 > odbcinst.ini files are matching exactly:-
 > set_err:State('82') is not a 5 character string, using 's1000' instead
 > at /usr/local/lib64/perl5/DBD/ODBC.pm line 153. DBI
 > connect('VertcaiABITPRIM','nbxxxxx',...)failed: 523 80 (SQL-82).
 > Any pointer would be appreciated.
 > Regards,
 > Mr. Singh

What version of Perl, DBI and DBD::ODBC are you using (latest does not
help as new versions have recently been released))? You can generally
get these using:

perl --version
perl -MDBI -le 'print $DBI::VERSION'
perl -MDBD::ODBC -le 'print $DBD::ODBC::VERSION'

Error state '82' is not a 5 character string and ODBC states should be.
It might also be useful if you can provide any details of the Vertica
ODBC Driver. S1000 is now HY000 which is a general error and should be
accompanied with some error string.

Error '82' (even 82000) does not exist. Error code 08002 does exist and
that can be found here ->
http://www.easysoft.com/developer/interfaces/odbc/sqlstate_status_return_codes.html#08002

If you are using a recent DBI and DBD::ODBC you can do:

DBI_TRACE=DBD=x.log perl myprogram.pl <http://myprogram.pl/>

and x.log should contain the log of odbc calls which would help me
identify your problem. If this file ends up empty, try again with:

DBI_TRACE=15=x.log perl myprogram.pl

Martin
-- Martin J. Evans
Wetherby, UK



Reply via email to