Hi,
I need a script to execute below task. As of now I am doing it manually and want it automated.
1)go to below path
cd /path/of/file
check for the availibility of two file as below of the latest date.
test.week1.data
test.week2.data
Case1. If above files are not present then an exception would come via mail. script halt exceution and exit.
Case2. If above files are present then script will do following task
Connect to TEST database
run below query
select * from temp_data.
alter trigger CHANGE_DATE_TRG disable;
update temp_data set NEXT_EXPECTED=trunc(sysdate-2), NEXT_APPLICABLE=trunc(sysdate-2) where DATAFEED_APK in ('OTC','OTW');
commit;
alter trigger CHANGE_DATE_TRG enable;
exit
3)Once Case2 completed we should receive a success message via mail.
Lastly after the completion of only Case2 steps below script will be run
nohup path/of/SCRIPT/feed_cron.sh &
4) If All activity completed we should get a succesful message as "DATA LOADING STARTS SUCCESFULLY"
It would be best If it is possible to get logs of each activity we performed.
Many thanks in advance. Please help