0

I have 5 SQL scripts which need to be run in parallel. Kindly suggest how to write a text file which should initiate the 5 command prompts and each command prompt should execute a script.

Text file like:

SQLPLUS userid/password@DB @script_path1.SQL
SQLPLUS userid/password@DB @script_path2.SQL
SQLPLUS userid/password@DB @script_path3.SQL
SQLPLUS userid/password@DB @script_path4.SQL
SQLPLUS userid/password@DB @script_path4.SQL

I have to run above 5 scripts in a single click of .bat file , I am able to achieve it in a single session, looking for multi-session.

start SQLPLUS userid/password@DB @script_path1.SQL start SQLPLUS userid/password@DB @script_path2.SQL start SQLPLUS userid/password@DB @script_path3.SQL start SQLPLUS userid/password@DB @script_path4.SQL start SQLPLUS userid/password@DB @script_path4.SQL Above 5 line i shaved in one text file now i am running that text file in command prompt. so system should be able to open new window by start and the password and userd should be used to connect to database schema and execute the query . i hope now its more clear for my requirement.

Regards.. Rahul yadav

  • 1
    [Possible duplicate](https://stackoverflow.com/q/11010834/266304) - is that all you're looking for, doing `start sqlplus...` five times? – Alex Poole Aug 08 '18 at 08:38
  • Possible duplicate of [How to run multiple DOS commands in parallel?](https://stackoverflow.com/questions/11010834/how-to-run-multiple-dos-commands-in-parallel) – PKey Aug 08 '18 at 08:42
  • @AlexPoole Yeah looklike it should work using start , but it is not working i have added start for each line followed by start SQLPLUS user id/ password. But seems system is not opening 5 different window and running each script in each Command window. – Rahul Yadav Aug 14 '18 at 13:41
  • @Plirkee Yeah looklike it should work using start , but it is not working i have added start for each line followed by start SQLPLUS user id/ password. But seems system is not opening 5 different window and running each script in each Command window. – Rahul Yadav Aug 14 '18 at 13:43

0 Answers0