joy_deep has asked for the wisdom of the Perl Monks concerning the following question:

Hello all,

I am trying to install DBD for DB2. I have downloaded DBD-DB2-1.80a.tar.gz as well as DBD-DB2.ppd. I am using Windows 7 64-bit with Visual C++ 2008 Express edition.

When I try to ppm install DBD-DB2.ppd, it gives me error "ppm install failed: The PPD does not provide code to install for this platform".

I downloaded Active Perl 32-bit and installed it. DBD::DB2 is not included but DBD::Oracle is there and working fine. I ran vsvars32.bat. Then from CPAN, when I issued install DBD::DB2, it gave so many warnings and finally with these following 6 errors, it stopped.

dbdimp.obj : error LNK2019: unresolved external symbol _SQLGetLength@2 +0 referenced in function _get_lob_length dbdimp.obj : error LNK2019: unresolved external symbol _SQLGetSubStrin +g@40 referenced in function _get_lob_data dbdimp.obj : error LNK2019: unresolved external symbol _sqledcls_api@8 + referenced in function _db2_data_sources dbdimp.obj : error LNK2019: unresolved external symbol _sqledgne_api@1 +2 referenced in function _db2_data_sources dbdimp.obj : error LNK2019: unresolved external symbol _sqledosd_api@1 +6 referenced in function _db2_data_sources dbdimp.obj : error LNK2019: unresolved external symbol _SQLBindFileToP +aram@32 referenced in function _db2_bind_ph blib\arch\auto\DBD\DB2\DB2.dll : fatal error LNK1120: 6 unresolved ext +ernals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual S +tudio 9.0\VC\BIN\link.EXE"' : return code '0x460' Stop.

What am I doing wrong here? Please help.

Thanks, Joydeep

Replies are listed 'Best First'.
Re: DBD-DB2
by locked_user sundialsvc4 (Abbot) on May 01, 2011 at 15:55 UTC

    Well, I do not have personal experience with DB2 in that environment, but I daresay I can hazard a guess that the DB2 interface to your computer requires that certain drivers or libraries be present, and they’re not there ... such that no application, Perl or otherwise, would be able to connect.   Can any other application on your computer access the DB2 databases right now?   If you just installed the driver software, have you rebooted your machine since then?

      What other applications are you talking about? I can access DB2 through JDBC, ODBC using Java, VB etc. I cannot install DBD DB2.

      Thanks, Joydeep

        Did you read the readme that comes with DBD::DB2. Specifically:

        Ensure the following DB2 product is installed. DB2 Application Development Client v7.2 or later Included with the DB2 Personal Developer's Edition and the DB2 Universal Developer's Edition The Application Development Client can be downloaded here: http://www.ibm.com/software/data/db2/udb/support/

        Have you installed the latest version of the client?

Re: DBD-DB2
by Brutha (Friar) on Mar 12, 2012 at 09:56 UTC

    Just for completeness.

    Yes, DB2 development kit has to be installed.

    I, too, have not found a 64-bit DBD-DB2 ppm to download.

    Before nmakeing with VC10 and Perl64, You have to set the environment for the C-Compiler with vcvarsx86_amd64.bat, even on an Intel machine. Then it compiles without problems.

    I still have the problems described in DBD::DB2 with ActiveState Perl 5.12 on Windows and Problem with AUTOLOAD and Windows, no working modules out of the box, but the modification suggested by tye seems to work.

    And it came to pass that in time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
    (Terry Pratchett, Small Gods)