Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with Cron to access oracle
Johnny Tjokro (tjokroj_at_ibm.net) wrote:
: Hi ..
: I am expecting to run stored_procedure in ORACLE using cronjob and I
: have to use cronjob. I am not allowed to used DBMS_JOB.
: I have Korn-shell script that have no problem running manually.
: But, when I put my Korn Shell script in the Cron. It got problem.
: My Korn Shell script's name is : daily.ksh
: When I excecute this script from Unix prompt:
: $ daily.ksh
: It works just fine.
: daily.ksh
: #!/bin/ksh
: #
: #
: umask 0
: sqlplus user_at_database_name/paswd
: set serveroutput on;
: execute sp_daily;
: exit;
: EOF
: -------
: However, when I put it in Cron,
: crontab -l
: 0 17 * * 1-5 /export/home/daily.ksh
: It gives me message : sqlplus not found.
: Any help would be appreciated. Thank you very much.
When a cron job is run it does not set up any user profile ie no ORACLE_HOME, ORACLE_SID etc.. You must set this up via the script that cron runs.
Helen Received on Fri Aug 07 1998 - 09:26:20 CDT
![]() |
![]() |