Hey all,
I'm trying to use the Perl DBI with the DB2 DBD, and had no problems with
DB2 V7. For DB2 V8 however, I get the dreaded "Total Environment allocation
failure!". I've done some searching in the list archives, and tried all the
recommendations for setting up the environment variables. To no avail.
I've gone through the db2profile file that gets executed when setting up the
DB2 environment, and I think I've covered all the DB2 environment variable
settings in my Perl script. I even added the Java stuff in the classpath.
Below is a snip from a debug session with the failing script. After the
failure I print out the environment variables, and they look right to me.
If anyone has any ideas, I'd love to hear them.
thanks,
/T
DB<1>
main::(./monitorv8.pl:43): my $dbh = DBI->connect("dbi:DB2:$dbname",
$user, $passwd) || die "$connectfail $dbname";
DB<1>
DBI->connect(mjfoest) failed: Total Environment allocation failure! Did you
set up your DB2 client environment? at ./monitorv8.pl line 43
Could not connect to database mjfoest at ./monitorv8.pl line 43, <CTRL> line
34.
Debugged program terminated. Use q to quit or R to restart,
use O inhibit_exit to avoid stopping after program termination,
h q, h R or h O to get additional info.
DB<1> p $DB2DIR
/opt/IBM/db2/V8.1
DB<2> p $DB2INSTANCE
db2v8i
DB<3> p $INSTHOME
/export/home/db2v8i
DB<4> p $LD_LIBRARY_PATH
:/export/home/db2v8i/sqllib/lib
DB<5> p $PATH
/opt/autotree/autosys/bin:/opt/autotree/autosys/inforeports:/usr/bin:/export
/home/db2v8i/sqllib/bin:/export/home/db2v8i/sqllib/adm:/export/home/db2v8i/s
qllib/misc
DB<6> p $CLASSPATH
/export/home/db2v8i/sqllib/java/db2java.zip:/export/home/db2v8i/sqllib/java/
db2jcc.jar:/export/home/db2v8i/sqllib/function:/export/home/db2v8i/sqllib/ja
va/db2jcc_license_cisuz.jar:/export/home/db2v8i/sqllib/java/db2jcc_license_c
u.jar:.
DB<7> q
Tomas Hallin
Database Administration
Robert Half International
Pleasanton, CA
Carpe Diem Vita Brevis