Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: shell scripting help

RE: shell scripting help

From: Johnson, George <GJohnson_at_GAM.COM>
Date: Thu, 4 Aug 2005 14:18:28 +0100
Message-ID: <>

        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 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,
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.  


-----Original Message-----
From: Smith, Ron L. [] Sent: 04 Aug 2005 13:42
To:; 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.  


-----Original Message-----
From: [] On Behalf Of d cheng
Sent: Wednesday, August 03, 2005 4:49 PM To:
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 &

sqlplus un/pw @final.sql

Thank you in advance for your help!  

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

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.

This message contains confidential information and is intended only for the individual or entity named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as an invitation or offer to buy or sell any securities or related financial instruments.
GAM operates in many jurisdictions and is regulated or licensed in those jurisdictions as required.
Received on Thu Aug 04 2005 - 08:20:33 CDT

Original text of this message