Crontrab runs a minimal profile before it executes the command. You man need to run the root profile within your script. Use the . (dot) command to exeute another script as if it were part the running script. (E.g., . /root/.profile )
I run my db2 scripts from cron as user db2inst1. That solved some of the problems with ownership. Good luck, Tom Shilson Powered by Penguins Unix Team / IT Server Services Tel: 651-733-7591 tshilson at mmm dot com Fax: 651-736-7689 Linux on 390 Port <[email protected]> wrote on 09/04/2007 10:02:18 AM: > I'm trying to finish a script that will bring > down/backup/zip/restart our database and schedule it > using crontab. > If I su to root and start the script it works fine. > I've got everthing working except the down part of > DB2. > Everytime I issue the command I get permission denied. > I was getting it on the force but I set the profile > and that part works. I just can't seem to get db2stop > command to work. > Here is the command I have in the script: > /opt/IBM/db2/V8.1/adm/db2stop > What am I missing? > What's the difference in su and placing something in > roots crontab?? > thanks > Mace > > > > > ____________________________________________________________________________________Ready > for the edge of your seat? > Check out tonight's top picks on Yahoo! TV. > http://tv.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 > ---------------------------------------------------------------------- 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
