Okay, I solved the problem. The person who owned the scripts before I
did hard coded the instance name into the script, and so when it was
moved to a different machine it didn't work. Doh! Silly him for doing
that, and silly me for not creating a small test script. Double doh!

Sorry for bothering the list.

On Apr 8, 2005 4:49 PM, Owen Berry <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I'm experiencing the wonderful "Total Environment allocation failure"
> message when using DBD::DB2. I've searched all over for people with
> this problem, but everyone else seems to be suffering when running as
> a CGI program. Mine is a CGI program, but I also get the error when
> running from the command line, as the instance owner, with the
> db2profile sourced and environment variables set. Hmph!
> 
> Environment:
>     Linux x86 - Fedora Core 3
>     DB2 v8.1.0.24 fixpack 3
>     Perl v5.8.5
>     Perl-DBI 1.40
>     DBD::DB2 v0.78
> 
> I have no problems accessing the database using CLI, JDBC, the db2
> command line program, everything except Perl DBI. I recently upgraded
> from FC2 to FC3 and that is when my problems started - it worked
> before then.
> 
> I am using DBD-DB2-0.78 downloaded from CPAN. I recompiled, tested and
> reinstalled after my OS upgrade. I also tried changing the
> optimization level from O2 to O0 as recommended in the CAVEATS file. I
> also followed the recommendations for binding. No apparent effect for
> all my efforts.
> 
> Here is the output with DBI_TRACE=3:
> 
>     -> DBI->connect(dbi:DB2:disc_dev, dbdisc, ****, HASH(0x9b666c4))
>     -> DBI->install_driver(DB2) for linux perl=5.008005 pid=10941
> ruid=107 euid=107
>        install_driver: DBD::DB2 version 0.78 loaded from
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/DBD/DB2.pm
>     New DBI::dr (for DBD::DB2::dr, parent=, id=)
>     dbih_setup_handle(DBI::dr=HASH(0x9c387a0)=>DBI::dr=HASH(0x9d31524),
> DBD::DB2::dr, 0, Null!)
>     dbih_make_com(Null!, 0, DBD::DB2::dr, 96, 0) thr#9a49008
>     <- install_driver= DBI::dr=HASH(0x9c387a0)
>     -> connect for DBD::DB2::dr (DBI::dr=HASH(0x9c387a0)~0x9d31524
> 'disc_dev' 'dbdisc' **** HASH(0x9d32550)) thr#9a49008
>     New DBI::db (for DBD::DB2::db, parent=DBI::dr=HASH(0x9d31524), id=)
>     dbih_setup_handle(DBI::db=HASH(0x9d314e8)=>DBI::db=HASH(0x9d32580),
> DBD::DB2::db, 9c384f4, Null!)
>     dbih_make_com(DBI::dr=HASH(0x9d31524), 9d36100, DBD::DB2::db, 104,
> 0) thr#9a49008
> Total Environment allocation failure!  Did you set up your DB2 client
> environment? error -1 recorded: Total Environment allocation failure!
> Did you set up your DB2 client environment?
>     <> DESTROY ignored for outer handle DBI::db=HASH(0x9d314e8) (inner
> DBI::db=HASH(0x9d32580))
>     -> DESTROY for DBD::DB2::db (DBI::db=HASH(0x9d32580)~INNER) thr#9a49008
>          DESTROY for DBI::db=HASH(0x9d32580) ignored - handle not initialised
>        error: -1 'Total Environment allocation failure!  Did you set
> up your DB2 client environment?'
>     <- DESTROY= undef at DBI.pm line 590 via
> /home/http/lib/perl/Customer/DB2Func.pm line 63
>     !! ERROR: -1 'Total Environment allocation failure!  Did you set
> up your DB2 client environment?'
>     <- connect= undef at DBI.pm line 590 via /home/http/cgi-bin/disc line 31
>     -> errstr in DBD::_::common for DBD::DB2::dr
> (DBI::dr=HASH(0x9c387a0)~0x9d31524) thr#9a49008
>        error: -1 'Total Environment allocation failure!  Did you set
> up your DB2 client environment?'
>     <- errstr= 'Total Environment allocation failure!  Did you set up
> your DB2 client environment?' at DBI.pm line 593 via
> /home/http/cgi-bin/disc line 31
>        DBI connect('disc_dev','dbdisc',...) failed: Total Environment
> allocation failure!  Did you set up your DB2 client environment?
> DBI connect('disc_dev','dbdisc',...) failed: Total Environment
> allocation failure!  Did you set up your DB2 client environment? at
> /home/http/lib/perl/Customer/DB2Func.pm line 63
>     -> $DBI::errstr (&) FETCH from lasth=HASH
>     >> DBD::DB2::dr::errstr
>     <- $DBI::errstr= 'Total Environment allocation failure!  Did you
> set up your DB2 client environment?'
>     -- DBI::END
>     -> disconnect_all for DBD::DB2::dr
> (DBI::dr=HASH(0x9c387a0)~0x9d31524) thr#9a49008
>     <- disconnect_all= 1 at DBI.pm line 659 via /home/http/cgi-bin/disc line 0
> !   -> DESTROY for DBD::DB2::dr (DBI::dr=HASH(0x9d31524)~INNER) thr#9a49008
> !   <- DESTROY= (not implemented) during global destruction
> !   <> DESTROY for DBI::dr=HASH(0x9c387a0) ignored (inner handle gone)
> 
> Any assistance would be greatly appreciated. Thanks in advance!
>

Reply via email to