in reply to "Total Environment allocation failure" after DBI and DBD::DB2 upgrade

Try:

$ cd /home/db2inst3/sqllib $ . ./db2profile

For DB2 and CGI you used to need:

SetEnv DB2_PATH /opt/IBM/db2/V9.5 SetEnv DB2INSTANCE db2inst3 SetEnv SQLLIB /opt/IBM/db2/V9.5/sqllib

Replies are listed 'Best First'.
Re^2: "Total Environment allocation failure" after DBI and DBD::DB2 upgrade
by andreas1234567 (Vicar) on Apr 24, 2008 at 20:18 UTC
    Thanks tachyon-II. I think I already got those covered:
    $ tail -5 ~/.bashrc if [ -f /home/db2inst3/sqllib/db2profile ]; then . /home/db2inst3/sqllib/db2profile fi $ ls -l /home/db2inst3/sqllib/db2profile -rwxr-xr-x 1 db2inst3 db2iadm1 6625 Apr 24 12:26 /home/db2inst3/sqlli +b/db2profile $ /home/db2inst3/sqllib/db2profile $ perl use strict; use warnings; use DBI; use DBD::DB2; DBI->connect('DBI:DB2:viper', 'db2inst3', ''); __END__ DBI connect('viper','db2inst3',...) failed: Total Environment allocati +on failure! Did you set up your DB2 client environment? at - line 5
    Could the explanation lay elsewhere?
    --
    No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]

      The line in your .bashrc and what you type at the command line are not equivalent. There is a subtle and very important difference, particularly when it comes to setting the environment.

      $ /home/db2inst3/sqllib/db2profile

      Will fork a subshell, set the environment (for that subshell), and exit. The environment in your current shell remains unchanged.

      Although your .bashrc should be handling it there would seem to be no harm in trying either of these which will run db2profile in your current shell.

      $ . /home/db2inst3/sqllib/db2profile $ source /home/db2inst3/sqllib/db2profile