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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Running a sequence of Sql statements from a unix script

Re: Running a sequence of Sql statements from a unix script

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 03 Sep 1998 14:33:56 GMT
Message-ID: <3609a86e.92384682@192.86.155.100>


A copy of this was sent to Keith Jamieson <pdkj02_at_email.mot.com> (if that email address didn't require changing) On Thu, 03 Sep 1998 15:05:35 +0100, you wrote:

>Hi guys and gals,
>just a quick question. I know you can do this in Ingres using the ingres
>terminal monitor, does oracle have an equivalent.
>What I require is a method of executiong a series of sql statements e.g
>in a unix shell script and have some method of telling sqlplus that it
>is finished executing the first statement and its now time to go on to
>the next statement, etc.
>
>I know you can pipe each statement through sqlplus, but i'm looking for
>something a bit friendlier, e.g. ingres terminal monitor for oracle

in a sh script, something like:

#!/bin/sh

....

sqlplus user/pass <<EOF
select * from t1;
select * from t2;
insert into foo values ( 1);
exit
EOF ....

works... is this what you are looking for?  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu Sep 03 1998 - 09:33:56 CDT

Original text of this message

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