Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Crontab ,HELP!!!
The script probably needs to set up the oracle environment variables before it will work. Try this.
1) In the oraenv script that's either in /opt/bin or /usr/local/bin depending on your platform, look for the comment that says "Install any custom code here" and insert right after it the following line. Don't forget the dot as the first character.
. /usr/local/bin/profile.ora
2) Create a profile.ora file in /usr/local/bin (or opt/bin) and have it set up the platform specific environment variables that you need. Ours looks like this for SGI IRIX64.
SGI_ABI=-64; export SGI_ABICOMPILER_DEFAULTS_PATH=$ORACLE_HOME/lib; export COMPILER_DEFAULTS_PATHLD_LIBRARY64_PATH=$ORACLE_HOME/lib; export LD_LIBRARY64_PATHLD_LIBRARY_PATH=/usr/dt/lib:$ORACLE_HOME/lib:/usr/openwin/lib:/usr/ucblib; export LD_LIBRARY_PATHLD_LIBRARYN32_PATH=$ORACLE_HOME/lib32; export LD_LIBRARYN32_PATHCLASSPATH=$ORACLE_HOME/jdbc/lib/classes11.zip; export CLASSPATH
3) In your cron scripts, put the following lines at the beginning to set up the environment.
ORACLE_SID=sidname ; export ORACLE_SIDORAENV_ASK=NO ; export ORAENV_ASK. /opt/bin/oraenv
"Dash, Saroj (CAP,CEF)" <Saroj.Dash_at_gecapital.com> wrote:
Hello All,I want to run a Job using crontab scheduling.The job is running butwith error like sqlplus and svrmgrl not found.When I am using the crontab script then it gives some error ,likesqlplus and svrmgrl not found.But ths same scripts manually working fine .So please tell me is there any path will setup to run the crontab . I amrunning the crontab from oracle id ,not from root.Please tell me what is the problem if i will run in orcale id. Where i willgive permission so that it will get the path of sqlplus and svrmgrl .I am sending the out put of cron .Please see it and tell me.our "cron" job on JLCSBLU1/db/oracle/oradata/scripts/SIEBELBKUP/coldbkupproduced the following output:Started Cold Backup For jlisuser Wed Feb 7 11:05:01 JST 2001Started Cold Backup For jlisuser Wed Feb 7 11:05:01 J!
!
ST 2001/db/oracle/oradata/scripts/SIEBELBKUP/coldbkup: sqlplus: not found/db/oracle/oradata/scripts/SIEBELBKUP/coldbkup: sqlplus: not found/db/oracle/oradata/scripts/SIEBELBKUP/coldbkup: sqlplus: not found/db/oracle/oradata/scripts/SIEBELBKUP/coldbkup: sqlplus: not found/db/oracle/oradata/scripts/SIEBELBKUP/coldbkup: /bin/svrmgrl: not foundRegards,saroj.-- Please see the official ORACLE-L FAQ: http://www.orafaq.com-- Author: Dash, Saroj (CAP,CEF)INET: Saroj.Dash@gecapital.comFat City Network Services -- (858) 538-5051 FAX: (858) 538-5051San Diego, California -- Public Internet access / Mailing Lists--------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail messageto: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list y!