Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

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

Re: shell scripting help

From: Jared Still <jkstill_at_gmail.com>
Date: Thu, 4 Aug 2005 10:46:11 -0700
Message-ID: <bf4638050804104629da6e37@mail.gmail.com>


That sounds incorrect to me.

Give it a try:

exit

sqlplus scott/tiger @s.sql 2>&1 >/dev/null &
sqlplus scott/tiger @s.sql 2>&1 >/dev/null &
sqlplus scott/tiger @s.sql 2>&1 >/dev/null &

echo waiting on sqlplus jobs
ps -flaujkstill | grep [s]qlplus

wait

---

10:47-6 > ./s.sh
waiting on sqlplus jobs
000 S jkstill 10926 10889 0 69 0 - 3737 read_c 10:24 pts/0 00:00:00 
/u01/app/oracle/product/9.2.0/bin/sqlplus
000 S jkstill 11344 11343 0 73 0 - 3364 pipe_w 10:48 pts/6 00:00:00 sqlplus
000 R jkstill 11345 11343 0 74 0 - 3442 - 10:48 pts/6 00:00:00 sqlplus
000 S jkstill 11346 11343 0 73 0 - 3442 pipe_w 10:48 pts/6 00:00:00 sqlplu


On 8/4/05, Smith, Ron L. <rlsmith_at_kmg.com> wrote:

>
> 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.
>
> --
Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist -- http://www.freelists.org/webpage/oracle-l
Received on Thu Aug 04 2005 - 12:48:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US