Morning,
Im having abit of trouble here..
I have a .sql and also .sh file in my unix system. It is supposed to update two tables in my oracle database.
When i run the .sh file, it does the work properly without problem but when I cron it, it does but the row is not reflected in my database.
Ive checked on the paths, commit and so on.. but have no idea why this is happening only when i cron it.
.sql
spool /app/ITRAKPI/Unspecified_Call/insert_unspecified.log
INSERT into PREPAID_IN_UNSPECIFIED_CALL VALUE(
SELECT to_date(COD_DATE, 'yyyymmdd'), NBR_CALLS, TOT_COST, TOT_DURATION
FROM NR_CHECK_CALLS_31
MINUS
SELECT COD_DATE, TOTAL_CALLS, TOTAL_COST, TOTAL_DURATION from PREPAID_IN_UNSPECIFIED_CALL);
commit;
spool off
exit
.sh
sqlplus username/password@IT_RA @/app/ITRAKPI/Unspecified_Call/insert_unspecified.sql
more /app/ITRAKPI/Unspecified_Call/insert_unspecified.log | mailx -s "Unspecified_Call_Insertion" shatishr@digi.com.my
cron command:
03 11 * * * /app/ITRAKPI/Unspecified_Call/insert_unspecified.sh
Anyone can analyze this and inform me whats the problem ? Im sure nothing is wrong with the codes since it can run when i do it manually. ??