If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Set unsupported environment vars for db2 processes ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-27-09, 12:48
vilius vilius is offline
Registered User
 
Join Date: Nov 2007
Posts: 55
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:
Quote:
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
Reply With Quote
  #2 (permalink)  
Old 04-27-09, 19:15
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
try to source your .profile (.login), restart the instance and then check ps eww output
Reply With Quote
  #3 (permalink)  
Old 04-28-09, 04:09
vilius vilius is offline
Registered User
 
Join Date: Nov 2007
Posts: 55
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 04:18.
Reply With Quote
  #4 (permalink)  
Old 04-28-09, 09:25
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
.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=...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On