problem connecting to DB2 in perl using DBI



Hi All,

I am trying to connect to DB2 via cross platform call, which
fails. I am able to connect to the DB2 in a standalone perl. I am also
able to connect to DB2 via Java. But when I make a call to the perl
through java, and that perl tries connecting to the DB2, the connection
does not succeed. It fails at the following statement --

$dbh = DBI->connect ("dbi:ODBC:$server", $username, $password);

And the error is --

DBI->connect(DP2K) failed: [Microsoft][ODBC Driver Manager] Driver's
SQLAllocHandle on SQL_HANDLE_ENV failed (SQL-IM004)(DBD:
db_login/SQLConnect err=-1)

I am connecting to DB2 in java through the --
com.ibm.db2.jcc.DB2Driver -- Driver and it connects successfully its
next when I try to connect to DB2 again through perl (which is called
via java class) it fails.

Is some different connect string required when we make such a call ?

Thanks and Regards
Shilpa

.



Relevant Pages

  • problem connecting to DB2 in perl using DBI
    ... I am able to connect to the DB2 in a standalone perl. ... able to connect to DB2 via Java. ... It fails at the following statement -- ...
    (perl.dbi.users)
  • Antwort: Re: Access into MVS DB2 using DBI or ???
    ... perl to access a DB2 on a mainframe nor on any other operating system. ... On the machine where you run your perl script you need the db2-connection ... > use DBI; ... experience connecting to MVS DB2 so I can't offer any more help here. ...
    (perl.dbi.users)
  • Re: DBI/DBD::DB2
    ... you don't compile a module in the Perl install tree - you compile ... Perhaps the capitalisation of DBD 'DB2' isn't right. ...
    (perl.dbi.users)
  • Using Perl DB2 driver (DBD-DB2) with DB2 UDB Version 8 64bit for AIX 5.2
    ... If you're having problems getting DBD-DB2 to work with 64-bit DB2 UDB ... Cannot load module error when using DB2 Perl driver with DB2 UDB ... Run the following command as root: ... To install the eFix, you can run the following command as root: ...
    (perl.dbi.users)
  • RE: DBD::DB2 Error
    ... I finally got past the license issue. ... It looks as though the DB2 9 I ... Perl Version = 5.008008 ... DBI Version = 1.53 ...
    (perl.dbi.users)