I have a written a script:
Code:
#!/usr/bin/ksh #--------------------------------------------------------------------------------------------------------------# #qz='sqlplus barcqz/xdr56yhn@BARP2' #wdc='sqlplus barcwdc/xdr56yhn@BARP2' #--------------------------------------------------------------------------------------------------------------# sqlplus barcqz/xdr56yhn@BARP2 <<EOF update qz_dates set QZ_DT = sysdate; update qz_dates_back set QZ_DT = sysdate; update wdc_dates set WDCDATE = sysdate; update WDC_PAY_EXRATE set WPESENTDATE = to_char(sysdate,'DD-MON-YY:HH:MI:SS') ; update WDC_OU_STARTTIME set WOSBUSINESSDATE =sysdate; commit; exit EOF sqlplus barcwdc/xdr56yhn@BARP2 <<EOF update WDC_PAY_EXRATE set WPESENTDATE=(substr(to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),1,10)||'T'||substr(to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),12,19)); commit; exit EOF
when i run this script on command prompt, it runs well, but when i schedule it in crontab, it gives an error as:
Code:
/devapp1_01/quartz/qzprod1/santosh/scripts/update_date.sh[6]: sqlplus: not found. /devapp1_01/quartz/qzprod1/santosh/scripts/update_date.sh[16]: sqlplus: not found. /devapp1_01/quartz/qzprod1/santosh/scripts/update_date.sh[6]: sqlplus: not found. /devapp1_01/quartz/qzprod1/santosh/scripts/update_date.sh[16]: sqlplus: not found.
could someone please help on this?