From oracle-l-bounce@freelists.org Thu Aug 4 08:20:33 2005 Return-Path: Received: from air891.startdedicated.com (root@localhost) by orafaq.com (8.12.10/8.12.10) with ESMTP id j74DKXw6014926 for ; Thu, 4 Aug 2005 08:20:33 -0500 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air891.startdedicated.com (8.12.10/8.12.10) with ESMTP id j74DKSIP014889 for ; Thu, 4 Aug 2005 08:20:28 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 7C0B91DC81A; Thu, 4 Aug 2005 08:20:22 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07618-01; Thu, 4 Aug 2005 08:20:22 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id E17BF1DC53D; Thu, 4 Aug 2005 08:20:21 -0500 (EST) X-VirusChecked: Checked X-Env-Sender: GJohnson@gam.com X-Msg-Ref: server-5.tower-59.messagelabs.com!1123161508!79137555!1 X-StarScan-Version: 5.4.15; banners=-,-,- X-Originating-IP: [193.202.231.222] Message-ID: From: "Johnson, George" To: dc4oracle@yahoo.com, Oracle-L@freelists.org Subject: RE: shell scripting help Date: Thu, 4 Aug 2005 14:18:28 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C598F7.009EFA50" X-archive-position: 23365 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: GJohnson@GAM.COM Precedence: normal Reply-To: GJohnson@GAM.COM X-list: oracle-l X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net X-mailscan-MailScanner-Information: Please contact the ISP for more information X-mailscan-MailScanner: Found to be clean X-MailScanner-From: oracle-l-bounce@freelists.org X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on air891.startdedicated.com X-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00, HTML_FONTCOLOR_BLUE,HTML_MESSAGE autolearn=no version=2.63 ------_=_NextPart_001_01C598F7.009EFA50 Content-Type: text/plain 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: @@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, 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. Rgds -----Original Message----- From: Smith, Ron L. [mailto:rlsmith@kmg.com] Sent: 04 Aug 2005 13:42 To: dc4oracle@yahoo.com; Oracle-L@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@freelists.org [mailto:oracle-l-bounce@freelists.org] On Behalf Of d cheng Sent: Wednesday, August 03, 2005 4:49 PM To: Oracle-L@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 & ... sqlplus un/pw @final.sql ... exit Thank you in advance for your help! - David __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com 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. **************************************************************************** ------_=_NextPart_001_01C598F7.009EFA50 Content-Type: text/html Message
        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:
            @@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, 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.
 
            Rgds
 
-----Original Message-----
From: Smith, Ron L. [mailto:rlsmith@kmg.com]
Sent: 04 Aug 2005 13:42
To: dc4oracle@yahoo.com; Oracle-L@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@freelists.org [mailto:oracle-l-bounce@freelists.org] On Behalf Of d cheng
Sent: Wednesday, August 03, 2005 4:49 PM
To: Oracle-L@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 &
...
sqlplus un/pw @final.sql
...
exit
 
Thank you in advance for your help!
 
- David
 

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


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.
****************************************************************************
------_=_NextPart_001_01C598F7.009EFA50-- -- http://www.freelists.org/webpage/oracle-l