I'm trying to execute a large data set. The DBA team is throwing a fit because it's taking hours to execute. But I'm currently running them sequencially.
My question is: What is the best way to execute multiple sql scripts that contain DML statements at the same time.
I'm going to take the big scripts (combination of inserts, updates, deletes) and break them up into multiple smaller scripts.
I'm looking to figure out how to fire off each script, but not wait for it to finish. It just immediately returns to the prompt...or in this case, would fire off the next script.
For example:
@sql_script_1a.sql
@sql_script_1b.sql
@sql_script_1c.sql
I thought I could do:
BEGIN execute immediate
'@./sql_script_1a.sql';
'@./sql_script_1b.sql';
'@./sql_script_1c.sql';
END;
/
But this does not work. It keeps telling me invalid sql statement.
But the key question here is to make it "fire and forget" each script so that they are running at the same time.