Ed, The problem isn't DB2, I am able to get it working. we verified it by going in a back way. The problemis with our frontend. We use an IE interface to get inot the DB. We bring IE up and when we try to login you can watch the time bar(for lack of a better term) at the bottom right side of the screen begin to work after about 30 seconds(or eternity) the username and password areas blank out and it waits for you to reenter but we then have to take down the services and restart them as root. Here are the command used to start the seervices and DB2: su - lits2 -c db2start /opt/WebSphere/AppServer/bin/startServer.sh server1 /opt/WebSphere/AppServer/bin/startServer.sh icmrm /opt/WebSphere/AppServer/bin/startServer.sh eClient_Server cd /etc /etc/rc.cmrmproc -act start
Also here is a cat of /etc/crontab: SHELL=/bin/sh IBMCMROOT=/opt/IBM/db2cmv8 LIBPATH=/opt/IBM/db2cmv8/lib:/home/lits2/sqllib/lib ##PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin this is the org path PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin:/home/lits2/sqllib/bin:/home/lits2/sqllib/adm:/home/lits2/sqllib/misc MAILTO=root Remember as root we can enter the ./command I use in crontab and it works. Sorry this was long winded TIA Mace --- "Edmund R. MacKenty" <[EMAIL PROTECTED]> wrote: > On Thursday 25 October 2007 09:51, LJ Mace wrote: > > thank you for the reply, but now I a bit confused. > >I did an env as root and a huge list of settings > came > >up. I then had cron submit the env commandto a > >file(env > /tmp/env.log) and I was suprised. The > path > >I set(roots path to be exact) wasn't there.Here is > the > >log I got: > > SHELL=/bin/sh > >PATH=/usr/bin:/bin > >PWD=/root > >SHLVL=1 > >HOME=/root > >LOGNAME=root > >_=/usr/bin/env > >I rechecked /etc/crontab and the path I put in > there > >is there. > >So where is my path statement or am I wrong in > >thinking that an env command from cron would show > the > >"new" path. > >thanks > >Mace > > That looks like the default environment that cron > would set up for the root > user, and is what I expected to see there. So it > looks like whatever you are > doing to set your PATH in the crontab isn't working. > Could you post your > crontab so we can see why that is? > > What is happening here is that cron does not read > the profiles that your shell > reads at login time, so the environment variables > you need for DB2 commands > to work properly are not being set. When your > command is being run from > cron, there is no login shell involved at all; it is > running the command > directly. > > A brute-force way around this problem is to > explicitly invoke a login shell > from your crontab that runs the DB2 command you > want. For example, you could > use: bash -l -c "db2-command" to make cron run a > shell that reads all the > login profiles (that's what the -l option does), > then runs the command given > by the -c option. > > However, that will do a lot more work than you want > it to, and can fail if > someone puts interactive commands or commands that > depend on a tty into > root's profile. It would be better to just make > your scripts source the > db2profile script as I mentioned before. Have you > tried that? > - MacK. > ----- > Edmund R. MacKenty > Software Architect > Rocket Software, Inc. > Newton, MA USA > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access > instructions, > send email to [EMAIL PROTECTED] with the > message: INFO LINUX-390 or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
