tracking progress of long running scripts
799968Sep 23 2010 — edited Sep 23 2010Hi,
I have a script that runs for more than an hour. It is a sequential list of queries/counts that produces an output.
I am finding that I only get the result if the whole script finishes.
If, for some reason, I have to abort the script, I can not see the results of the queries the script managed to finish.
I've tried using these methods:
1) (in a linux shell script)
sqlplus -s user@database/password @myscript.sql >> mylogfile.txt
2) (in myscript.sql)
spool mylogfile.txt
query1
query2
...
queryX
spool off
Is there a way for a list of queries to "pause" and save/commit the output to a logfile and continue with the rest of the script and append the rest of the results?
I hope someone can help me out.
Thanks,
Ian