Multi-threading with DB2 DBD



I have this multi-threaded perl program where I'm trying to do
independant database operations in separate threads. I was getting an
error similar to the following:

DB2 has no driver CLONE() function so is unsafe threaded


After looking at the code and some other perl DB drivers, I added the
following bit to the DB2.pm file:


sub CLONE {
$drh = undef;
}


I e-mailed a guy at IBM who had something to do with the Perl stuff
(sorry, can't remember the name) and he said that the underlying driver

should be all thread safe and this should work.
In all my testing that I've run, I've never had a problem running
multi-threaded with this code in place. So, my question is, does
anyone know how we'd get this change made to the DB2 DBD driver? I
gotta believe someone out there wants to use DB2 in a multi-threaded
Perl application. Am I going to have to keep patching this in by hand?



Thanks,
Greig Wise
Lead Database Developer
Press Ganey Associates

.



Relevant Pages

  • Re: Connect DB2 from Solaris
    ... DB2 connect for iSeries only to connect to the DB2 via perl? ... I believe that the native driver requires this. ... I also believe that the Java driver in the Java Toolbox (search for ...
    (comp.sys.ibm.as400.misc)
  • RE: perl DBI on windows 64
    ... Ramakrishna Raju ... My Perl on the 64-bit windows is 32 bit. ... The name implies it's a 32bit driver. ...
    (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)
  • Re: Is perl better? :(((
    ... I use jodbc14.jar from Oracle. ... And I can do it in both Java or perl. ... It seems for me more and more that difference is in OCI driver ... And when it three times slower then OCI... ...
    (comp.lang.java.databases)