Results 1 to 4 of 4

Thread: DB2 connection from Perl

Hybrid View

  1. #1
    Join Date
    Sep 2023
    Posts
    3

    DB2 connection from Perl

    Hi everyone. I have installed DB2 LUW 11.5.8 some days ago on my Windows 10. Connection from PHP 8.1 works fine, but I do not succeed to connect from Perl (Strawberry Perl 5.32.1.1, 64bit). Trying to install DBDB2 (using CPAN) fails. So, I tried to connect using ODBC. But, when running my script (essentially the same that I use with Firebird ODBC), nothing happens; what I mean is that the script runs and runs, no output... The problem can't be a bad configuration of my DSN, because connection from Windows ODBC Administartor worls well, and I succeed to read data from the "sample" database from a Lazarus/Free Pascal application, that connects using ODBC.
    No idea, what I do wrong... Thanks in advance for any help or suggestions.

  2. #2
    Join Date
    Sep 2023
    Posts
    5
    Ran into something similar with Perl and DB2 not too long ago. For me, it was all about the DBI driver version being funky. Check yours, maybe update or even roll it back. And yeah, since you're on Strawberry Perl 64-bit, double-check you got the 64-bit ODBC drivers. Oh, and try your Perl script with -w to see if it throws any warnings.

  3. #3
    Join Date
    Sep 2023
    Posts
    3
    I run all my Perl scripts with "use strict; use warnings". The ODBC driver is well the 64bit one.
    Concerning DBI, I use the actual version. You may be right that there is a problem with it. In fact, the DBD:Firebird module also fails to be installed (in this case ODBC works fine, but just tested on another machine). I think that I will try to install another version of Perl, 5.28 or even 5.20. I'll post the results, if one of these should work. Thanks for answering, anyway.

  4. #4
    Join Date
    Sep 2023
    Posts
    3
    The installation of DBD:B2 on Strawberry 5.28 and 5.20 fails with the same errors as on Strawberry 5.32. Where should I best look for help?

    Does someone have an idea if DB2 works with Python? Which version? How exactly proceed?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •