Hi,
Trying to run the Oracle Proc in parallel, but not working.. below code runs each call of the procedure and its coming out of the loop before its completion and printing the last statement! not waiting for the sqlplus to complete.
for name in `cat abc.txt`
do
(sqlplus -s usert/password@host <<-EOF>> error.txt
SET LINESIZE 1000
select '$name', TO_CHAR(current_timestamp(0),'DD-Mon-YYYY HH24:MI:SS') as start_time from dual;
EXEC proc('$name');
select '$name' ,TO_CHAR(current_timestamp(0),'DD-Mon-YYYY HH24:MI:SS') as end_time from dual;
EOF
) &
done
run the below part only if all the loops in the for has completed!
echo "Complete"
if i have like 10 different lines in the abc.txt, i need to have the code running parallely for each and complete the entire for loop only after all the 10 has completed, ie the start time for all the proc call should be same.