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: Running SQL script from the UNIX prompt

Re: Running SQL script from the UNIX prompt

From: Tribble Dave <DLT3716_at_KCPL.COM>
Date: Thu, 8 Feb 1996 08:01:00 PST
Message-Id: <9602081406.AA01115@alice.jcc.com>


One more thing on this:
You can set the: whenever sqlerror exit failure within sqlplus if you want your script to bomb if there's a big problem and set echo on
is good for displaying the SQL statement with the output. and one more way to run a sql script within a unix script: unix script



sqlplus << EOF
username/passwd
sql stuff
exit
EOF

Will run your SQL inline.
dlt3716_at_kcpl.com

From: owner-oracle-l
To: Multiple recipients of list ORACLE-L Subject: Re: Running SQL script from the UNIX prompt Date: Wednesday, February 07, 1996 3:02PM

On Wed, 7 Feb 1996, Raghu Katakam wrote:

> When I use the #sqlplus userid/passwd @sql_file from the UNIX prompt,
where
 does
> it output the errors (if any) flagged? Also, does it give any
informational
> messages like 'n rows updated' etc?
>

        Any output from the script sql_file.sql should go to
        the screen unless you redirect the output on the command
        line (like  > sql_file.log 2>&1 , where > is normal output
        and 2> is error output ... it think that's standard unix).

Received on Thu Feb 08 1996 - 09:06:38 CST

Original text of this message

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