Hello All,
I have a code that is calling login into database via sqlplus.
When I run the script from command line. It was able to log into the database. However, when I call the script from cronatb it says sqlplus: not found.
Here is the sameple of the script.
#!/bin/ksh
#at -k -m -f /export/home/oracle/batch/run_dump 0030
#
exec >/export/home/oracle/batch/dump_`date '+%Y%m%d'`.log 2>&1
#
ORACLE_SID=sid; export ORACLE_SID
ORALCE_HOME=/appl/oracle/10.1.0/bin; export ORACLE_HOME
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus sidprod/`cat /export/home/oracle/batch/.ora_passwd`<<!
select sysdate from dual;
exit
Again, this executed fine from command line, however, calling it from crontab gives error sqlplus not found.
Here is the entry for crontab:
02 14 * * * /export/home/oracle/batch/dump_wrapper.sh >> /dev/null 2>&1
Please help
I have a code that is calling login into database via sqlplus.
When I run the script from command line. It was able to log into the database. However, when I call the script from cronatb it says sqlplus: not found.
Here is the sameple of the script.
#!/bin/ksh
#at -k -m -f /export/home/oracle/batch/run_dump 0030
#
exec >/export/home/oracle/batch/dump_`date '+%Y%m%d'`.log 2>&1
#
ORACLE_SID=sid; export ORACLE_SID
ORALCE_HOME=/appl/oracle/10.1.0/bin; export ORACLE_HOME
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus sidprod/`cat /export/home/oracle/batch/.ora_passwd`<<!
select sysdate from dual;
exit
Again, this executed fine from command line, however, calling it from crontab gives error sqlplus not found.
Here is the entry for crontab:
02 14 * * * /export/home/oracle/batch/dump_wrapper.sh >> /dev/null 2>&1
Please help