prevent spooling from being stopped by spool off in secondary script being called
I'm working on a table purge routine that is a sql script. I start spooling a log at the beginning to check for errors. In the middle of the routine I call another sql script that generates dynamic sql to rebuild the indexes on the table(s). This routine spools a temp sql file to run. The issue is this sub routine requires a spool off to do its thing. Causing the spool logging in the main script to stop.
I'm looking for suggestions on how to best deal with this situation. Thank you.
0