> > 2. Run a simple Perl script connecting under gdb to see where it fails:
> >
> > gdb /usr/bin/perl (or wherever your Perl is)
> > run -MDBI -e 'my $dbh = DBI->connect("dbi:ODBC:xxx", "user", "pass");'
> >
> >    When it crashes enter bt for a back trace.

Here is a backtrace using a different driver:

(gdb) run -MDBI -e 'my $dbh = DBI->connect("dbi:ODBC:as400");'
Starting program: /usr/bin/perl -MDBI -e 'my $dbh =
DBI->connect("dbi:ODBC:as400");'
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...[Thread debugging using libthread_db
enabled]
[New Thread -1208035648 (LWP 13219)]
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208035648 (LWP 13219)]
0x00185084 in htoobj::htoobj () from /opt/ibm/iSeriesAccess/lib/libcwbodbc.so
(gdb) bt
#0  0x00185084 in htoobj::htoobj () from
/opt/ibm/iSeriesAccess/lib/libcwbodbc.so
#1  0x00176c9d in SQLFreeHandle () from /opt/ibm/iSeriesAccess/lib/libcwbodbc.so
#2  0x00d9e4db in odbc_db_login6 (dbh=0x8409b2c, imp_dbh=0x84160f0,
dbname=0x832a740 "as400", uid=0x83f4ad8 "", pwd=0x8377ce8 "",
    attr=0x8409afc) at dbdimp.c:662
#3  0x00d927fe in XS_DBD__ODBC__db__login (my_perl=0x82ba008,
cv=0x836ff84) at ODBC.xsi:92
#4  0x07ec79d2 in Perl_pp_entersub () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#5  0x07eaadbd in Perl_runops_debug () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#6  0x07e55ae6 in Perl_get_cv () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#7  0x07e5bc3e in Perl_call_sv () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#8  0x0032faaf in XS_DBI_dispatch () from
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/DBI.so
#9  0x07ec79d2 in Perl_pp_entersub () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#10 0x07eaadbd in Perl_runops_debug () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#11 0x07e5cc01 in perl_run () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#12 0x080493a2 in main ()
(gdb) 



And the odbc trace.

[ODBC][13219][SQLError.c][424]
                Entry:                
                        Connection = 0x8419678                
                        SQLState = 0xbfe716d0                
                        Native = 0xbfe714b8                
                        Message Text = 0xbfe714d0                
                        Buffer Length = 511                
                        Text Len Ptr = 0xbfe714be
[ODBC][13219][SQLError.c][461]
                Exit:[SQL_SUCCESS]                    
                        SQLState = 28000                    
                        Native = 0xbfe714b8 -> 8015                    
                        Message Text = [[unixODBC][IBM][iSeries Access
ODBC Driver]Communication link failure. comm rc=8015 - CWBSY1006 -
User ID
 is invalid, Password l]
[ODBC][13219][SQLError.c][424]
                Entry:                
                        Connection = 0x8419678                
                        SQLState = 0xbfe716d0                
                        Native = 0xbfe714b8                
                        Message Text = 0xbfe714d0                
                        Buffer Length = 511                
                        Text Len Ptr = 0xbfe714be
[ODBC][13219][SQLError.c][461]
                Exit:[SQL_NO_DATA]
[ODBC][13219][SQLError.c][504]
                Entry:                
                        Environment = 0x84190e8                
                        SQLState = 0xbfe716d0                
                        Native = 0xbfe714b8                
                        Message Text = 0xbfe714d0                
                        Buffer Length = 511                
                        Text Len Ptr = 0xbfe714be
[ODBC][13219][SQLError.c][541]
                Exit:[SQL_NO_DATA]

Reply via email to