I've just installed DBD::DB2 in AIX 5.3 64bit.
I've installed DB2 Connect Enterprise Edition V7.2 to access a MVS DB2
V7 database,
db2 connect level is

DB21085I  Instance "db2inst1" uses DB2 code release "SQL07029" with
level
identifier "030A0105" and informational tokens "DB2 v7.1.0.111",
"s050516" and
"U803327".

I execute my perl program,
I always get the following message when I run a SELECT query.

DBD::DB2::db prepare failed: Error calling SQLGetInfo at
check_table.pl line xxx.

Although this message, I can receive the result of the query.

<perl source>
    #!/usr/bin/perl -w
    use strict;
    use DBI;
    use DBD::DB2::Constants;
    use DBD::DB2;


    $dbh = DBI->connect("dbi:DB2:$dbname", $dbuser, $dbpass,
{RaiseError => 0}) or die "connect $? $DBI::errstr\n";

    $SQL = "SELECT REMARKS FROM SYSIBM.SYSTABLES WHERE NAME =
'$table_name' WITH UR";
    $sth = $dbh->prepare($SQL) or die "prepare $SQL $? $DBI::errstr
\n";
    $sth->execute() or die "execute $SQL $? $DBI::errstr\n";
    @row = $sth->fetchrow() or die "fetchrow $SQL $? $DBI::errstr\n";
    $table_remarks = $row[0];
    $sth->finish();
----------------------------------------------- SOURCE END
-----------------------------------------

I add trace code 'DBI->trace(9, "/tmp/db2.trc")' in my perl program,
so I can this trace log.

# cat /tmp/trace.log

    DBI 1.59-ithread default trace level set to 0x0/9 (pid 364658) at
check_table.pl line 77 via check_table.pl line 649
    >> DESTROY     DISPATCH (DBI::db=HASH(0x30417228) rc1/1 @1 g0
ima10004 pid#364658) at check_table.pl line 651 via  at check_table.pl
line 651
    <> DESTROY(DBI::db=HASH(0x30417228)) ignored for outer handle
(inner DBI::db=HASH(0x304171c8) has ref cnt 1)
    >> DESTROY     DISPATCH (DBI::db=HASH(0x304171c8) rc1/1 @1 g0
ima10004 pid#364658) at check_table.pl line 651 via  at check_table.pl
line 651
    -> DESTROY for DBD::DB2::db (DBI::db=HASH(0x304171c8)~INNER)
thr#30009678
    <- DESTROY= undef at check_table.pl line 651 via  at
check_table.pl line 651
    DESTROY (dbih_clearcom) (dbh 0x304171c8, com 0x304177d8, imp
DBD::DB2::db):
       FLAGS 0x100311: COMSET Warn PrintError PrintWarn AutoCommit
       PARENT DBI::dr=HASH(0x30021f6c)
       KIDS 0 (0 Active)
       LongReadLen 32700
    dbih_clearcom 0x304171c8 (com 0x304177d8, type 2) done.

    -- DBI::END ($@: , $!: )
    >> disconnect_all DISPATCH (DBI::dr=HASH(0x30021f00) rc1/3 @1 g0
ima801 pid#364658) at /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-
multi/DBI.pm line 717 v
ia  at check_table.pl line 0
    -> disconnect_all for DBD::DB2::dr
(DBI::dr=HASH(0x30021f00)~0x30021f6c) thr#30009678
    <- disconnect_all= 1 at /usr/opt/perl5/lib/site_perl/5.8.2/aix-
thread-multi/DBI.pm line 717 via  at check_table.pl line 0
!   >> DESTROY     DISPATCH (DBI::dr=HASH(0x30021f00) rc1/1 @1 g0
ima10004 pid#364658) during global destruction
!   <> DESTROY(DBI::dr=HASH(0x30021f00)) ignored for outer handle
(inner DBI::dr=HASH(0x30021f6c) has ref cnt 1)
!   >> DESTROY     DISPATCH (DBI::dr=HASH(0x30021f6c) rc1/1 @1 g0
ima10004 pid#364658) during global destruction
!   -> DESTROY in DBD::_::common for DBD::DB2::dr
(DBI::dr=HASH(0x30021f6c)~INNER) thr#30009678
!   <- DESTROY= undef during global destruction
    DESTROY (dbih_clearcom) (drh 0x30021f6c, com 0x30023168, imp
global destruction):
       FLAGS 0x100215: COMSET Active Warn PrintWarn AutoCommit
       PARENT undef
       KIDS 0 (0 Active)
    dbih_clearcom 0x30021f6c (com 0x30023168, type 1) done.


Hm... It's so difficult to debug.. ^^

Do you have any idea of how can I fix this problem and eliminate this
error message?

Thanks very much.

Reply via email to