Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: shell scripting help
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:Received on Thu Aug 04 2005 - 12:48:39 CDT
>
> 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