Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: shell scripting help
Apologies, if I have misunderstood your requirements, but seems straight forward.
If you want to complete, regardless of the results produced, why not simply write one sql script to run the sql scripts.
main_runner.sql script contains:then these will need to drop some kind of status "marker", say insert "SUCCESS" from 1-3 into a table and get final.sql to pick it and run if 1-3 have a row of SUCCESS from the work status table.
@@script1.sql
@@script2.sql
@@script3.sql
@@final.sql
Then simply run the main script: sqlplus un/pw @main_runner.sql. Each sql script will be run one after another. If you are interested in testing the results of 1-3 scripts,
Rgds
-----Original Message-----
From: Smith, Ron L. [mailto:rlsmith_at_kmg.com]
Sent: 04 Aug 2005 13:42
To: dc4oracle_at_yahoo.com; Oracle-L_at_freelists.org
Subject: RE: shell scripting help
Don't run them in the background (&). The second and third statements won't run until the previous SQL finishes.
Ron
-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org]
On Behalf Of d cheng
Sent: Wednesday, August 03, 2005 4:49 PM
To: Oracle-L_at_freelists.org
Subject: shell scripting help
Hi Listers,
I have a korn shell script which needs to run 3 sqlplus scripts in parallel then run the final sqlplus script. Is there a way to ensure that sqlplus scripts 1 thru 3 completes before running the final sqlplus script? I am a newbie in shell scripting.
<< shell script snippet >>
...
sqlplus un/pw @script1.sql & sqlplus un/pw @script2.sql & sqlplus un/pw @script3.sql &
Thank you in advance for your help!
Important Notice!!
If you are not the intended recipient of this e-mail message, any use,
distribution or copying of the message is prohibited.
Please let me know immediately by return e-mail if you have received this
message by mistake,
then delete the e-mail message.
Thank you.
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Aug 04 2005 - 08:20:33 CDT
![]() |
![]() |