Hi Experts,
Am facing some problems with script (Sun solaris 9). My script (sqlplus.sh)looks like this. . .
...............................................
set 'date'
dd=$3
export dd
mon=$2
export mon
yyyy=$6
export yyyy
cd /oracle/P47/saparch
LOG_FILE=/oracle/P47/saparch/archive_today_$yyyy$mon$dd.log
echo "*******************************************************************">> $LOG_FILE
date >> $LOG_FILE
sqlplus "/as sysdba"<< EOF >> $LOG_FILE
set serveroutput on ;
set time on ;
recover automatic standby database;
CANCEL
exit
EOF
echo "Finish applying archives in SAP DR site..." >> $LOG_FILE
echo " ----------------------------------------------------------">> $LOG_FILE
echo "End SAP DR script " >> $LOG_FILE
echo "=========================================================" >> $LOG_FILE
mailx -s "LOG - SAP DR applying archives $dd$mm$yy..."
vrjalli@xyz.com < $LOG_FILE
...............................................................................................
My problems are
1. When I run manually (with command: sh sqlplus.sh) it is working fine. But when i schedule in cron it is not working.
2. Mails are not coming.
3. Log file is coming without date stamp.(archive_today_.log)
Please help. . .
rgds