Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How I run a shell script from the scheduler on 10.2.0.2.0 ?
Oracle People,
Ravi's comments looked promising.
I looked for root.sh
bash sol oracle ~ 23 $ bash sol oracle ~ 23 $ bash sol oracle ~ 23 $ cd $ORACLE_BASE bash sol oracle ~ 24 $ find . -name root.sh -print./product/10r2/root.sh
bash sol oracle ~ 25 $ bash sol oracle ~ 25 $ bash sol oracle ~ 25 $ bash sol oracle ~ 25 $
I looked for evidence that it alters permissions of files related to external jobs:
bash sol oracle ~ 25 $ bash sol oracle ~ 25 $ bash sol oracle ~ 25 $ bash sol oracle ~ 25 $ bash sol oracle ~ 25 $ bash sol oracle ~ 25 $ grep CHOWN ./product/10r2/root.sh CHOWN=/bin/chown $CHOWN $ORACLE_OWNER $LBIN/`$ECHO $f | $AWK -F/ '{print $NF}'`2>&1 2>> $LOG
$CHOWN root $ORACLE_HOME/bin/nmo $CHOWN root $ORACLE_HOME/bin/nmb $CHOWN root /var/tmp/.oracle $CHOWN root /tmp/.oracle bash sol oracle ~ 26 $
I did not expect that it would. I'm diligent about following instructions when I install oracle.
Perhaps root.sh was enhanced by a quarterly patch. I'm on an eval
license; I have
no access to support or quarterly patches.
Anyway, I took these steps to follow Ravi's suggestions:
-emctl stop agent
-emctl stop dbconsole
-lsnrctl stop
-SHUTDOWN IMMEDIATE
chown root $ORACLE_HOME/bin/extjob chmod 4750 $ORACLE_HOME/bin/extjob chown root $ORACLE_HOME/rdbms/admin/externaljob.orachmod 640 $ORACLE_HOME/rdbms/admin/externaljob.ora
-STARTUP
-lsnrctl start
-emctl start agent
-emctl start dbconsole
Result?
It worked.
I can now run shell scripts from the scheduler.
Also I'm pleased that the scripts run as the user I specify in
$ORACLE_HOME/rdbms/admin/externaljob.ora
For security reasons I don't want external jobs run as a privileged user like oracle or root.
Thanks Ravi!
-Owen
Received on Sat Sep 08 2007 - 01:02:53 CDT
![]() |
![]() |