Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    62

    Unanswered: Set unsupported environment vars for db2 processes ?

    Hi,

    I have two similar db2 v8 instances, instance owner shell is csh. One of these systems has some problems - and I noticed that environments for db2 processes are different. I took db2agent process as an example and printed environment using AIX command:
    Code:
    ps eww somepid
    And yes the output was different - one instance had additional variables.

    According to IBM if I want to set unsupported environment variable:
    To set variables that are not supported by DB2 UDB, define them in your script files, userprofile and usercshrc.
    So I included missing variables into usercshrc, like:
    Code:
    setenv varname varvalue
    After that I restarted problematic instance and checked again using "ps eww pid" - there was no aditional variables I included in usercshrc !

    What am I doing wrong ? How to add additional environment variables to db2 processes(db2agent for example) ?

    thanks
    Vilius

  2. #2
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    try to source your .profile (.login), restart the instance and then check ps eww output

  3. #3
    Join Date
    Nov 2007
    Posts
    62
    Hi,

    .login .profile .cshrc sqllib/usercshrc sqllib/userprofile - all these files are the same(according to instance).

    One instance db2 processes have enviroment vars contained into usercshrc, while other instance processes don't - even usercshrc contains the same vars.
    Maybe one instance is configured NOT to read usercshrc somehow ?

    Vilius
    Last edited by vilius; 04-28-09 at 05:18.

  4. #4
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    .login should have a call to sqllib/db2profile and sqllib/db2profile should have a call to sqllib/usercshrc. Execute "env" to check if the variable is set.


    Example:

    env | grep -i db2test
    DB2TEST=132


    ps eww 876590
    PID TTY STAT TIME COMMAND
    876590 - A 0:00 db2sysc DB2_SKIP_TRACE=1 DB2TEST=132 HOME=...

Posting Permissions

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