Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

DBD::DB2 with ActiveState Perl 5.12 on Windows

by Brutha (Friar)
on Feb 03, 2011 at 12:58 UTC ( #885983=perlquestion: print w/replies, xml ) Need Help??
Brutha has asked for the wisdom of the Perl Monks concerning the following question:

Does anybody had success running DBD::DB2 under Windows and ActiveState Perl 5.12?
We are still on 5.8 but if You want to use Moose you need a more up to date version of Perl.

First I tried to find a PPM package at the usual suspects, ActiveState, Trouchelle, Bribes, uwinnipeg with no success.

Next I tried CPAN install and manual download of DBD::DB2 vesions 1.79 and 1.80a and both have no success.

nmake seems okay with a lot of warnings. The first test tells me that my vendor has not defined SQL_PARAM_INPUT_OUTPUT. I looked into the source and can see no reason why that constant should not be defined.

DB2 is version DB2 v8.1.7.445.

Perl 5.8 has a PPM package. As DB2 access is a "must have" I have to stay with 5.8

Did anybode have success with DB2 for Perl 5.12?

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

  • Comment on DBD::DB2 with ActiveState Perl 5.12 on Windows

Replies are listed 'Best First'.
Re: DBD::DB2 with ActiveState Perl 5.12 on Windows
by Corion (Pope) on Feb 03, 2011 at 13:03 UTC

    While I can't help you with building DBD::DB2, maybe as a workaround you can use DBD::ODBC on Windows to access DB2 through ODBC?

      That might be worth a try, but I have not much experience with ODBC. As a lot of existing scripts used DBD::DB2 successfully with Perl 5.8, that might not work via ODBC as we use functions, timestamp formating and the like. Another point is that DBD::DB2 (and underlying IBM Libraries) behave different for local and mainframe databases and I do not know what that means for ODBC.

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

Re: DBD::DB2 with ActiveState Perl 5.12 on Windows
by syphilis (Chancellor) on Feb 04, 2011 at 07:29 UTC
    Perl 5.8 has a PPM package

    From where is that package available ? I couldn't find it any of the usual repos, so I'm thinking that maybe it's being provided by the DB2 vendors ?

    I'm also thinking that if it's possible to build (for perl-5.8) a certain version of DBD::DB2 against a certain version of DB2, then it also has to be possible to do the same for perl-5.12. (I think it's unlikely that there's anything preventing that.)

    What version of DBD::DB2 does this 5.8 ppm package provide, and against which verison of DB2 was it built ?

        Hmmm ... I did check the kobes repo ... perhaps the 5.6 repo by mistake.

        Anyway, seems that DBD-DB2-1.79 is available for both 5.8 and 5.10 ... and there would no doubt very soon be a DBD-DB2 ppm package for 5.12 at had not Randy passed away in the latter part of last year.

        It should, of course, still be possible to build (for perl 5.12) that version of DBD::DB2 against whichever version of DB2 it was that Randy had.

        Unfortunately, it seems to me that they want money for their oh-so-precious library ... and I'm certainly not prepared to fork out for a copy.
        However, if the OP has a copy of that library, then I'm sure I/we can help out as regards getting DBD::DB2 built. We just need more information on the OP's problem.
        What did 'perl Makefile.PL' output ?

        Also, since we know that 1.79 builds on Windows, it's probably best to concentrate on getting that version built

        for ActiveState perl 5.12 - ppm install
Re: DBD::DB2 with ActiveState Perl 5.12 on Windows
by Brutha (Friar) on Feb 07, 2011 at 10:09 UTC

    As this was working perfectly for the previous version, I got the feeling that there might be just a simple stupid error on my side which did not allow the installation. But it seems that not many use DB2 in combination with Perl.
    For me the combination of Perl and DB2 works well, against pc and mainframe databases, even with the old DBD version.

    For Perl 5.8 the PPM tells me that there is a version 1.79 available, but installed is a version 0.78. As You see this is quite old but working for our production code. I vaguely remember having problems with some intermediate 0.xx version, therefore I left it working. But, of course, upgrading to a newer Perl version would also include newer versions of modules.

    For the DB2 version, this is an officially licenced development edition, which is needed for our development here. It will be updated to version 9.x some weeks in the future.

    The errors I get are a bit version dependend. For version 1.80A a broken Makefile is generated, due to some stupid spaces in Windows filenames (nmake not found). That can be manually hacked, but does not help. For 1.79 this works, I do not know why. After compilation I get the same error as described in the original posting. I looked into the C-Source, the compiler parameters and defines, the include files and could not find a reason, why this parameter should not be included into the binary.

    As Perl 5.12 is not binary compatible with 5.8, there is no chance to use the old one.

    For the Microsoft C-Compiler, this is version 14 which is included in Visual Studio 2005

    I am not so deep in XS generation, but there is a file resulting from Mkbootstrap which is empty. A dll with 100kb is created. Otherwise I have no idea what to check else.

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://885983]
Approved by Corion
[liz]: ^N is a very common idiom in Perl 6 to indicate "N times"
[liz]: The ^ indicates "exclude endpoint from range"

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2018-07-16 17:05 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (345 votes). Check out past polls.