I have the below in a bash script. The inputsqls.txt file contains 10 SQL statements that take several hours to run. Is there a way to periodically write the results to output.txt before all 10 statements have run? i.e. every 30mins write the results of all queries executed to the file or each time one query completes update the file, so that you can check say 4 of the query results without having to wait for all 10 to complete.
Eventually output.txt should contain the results of all 10 queries.
sqlplus -l <<sqlly > output.txt
USER/PASSWORD@SID
@inputsqls.txt
EXIT
sqlly
Note: breaking up each file to have just one statement is not an ideal workaround.