Quote:
|
Originally Posted by prasadv18
we are using crontab to schedule jobs
|
cron jobs run with the correct user-id, but practically without any environment.
Try adding a line like
. $HOME/.profile
at the beginning of the shell script that is started from crontab.
This should set DB2DIR, DB2INSTANCE, INSTHOME etc.; I'm assuming these are set through your .profile file. Typically, that file will have a line something like
. /data/udb/db2sysa/sqllib/db2profile
Adding that line to the cron script (instead of $HOME/.profile) should also work.