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

Home -> Community -> Usenet -> c.d.o.server -> Re: auto-exit pl/sql script from command line?

Re: auto-exit pl/sql script from command line?

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Tue, 27 Jan 2004 13:20:54 GMT
Message-ID: <WAtRb.11709$kD2.1893@news01.roc.ny>

"hastenthunder" <hastenthunder_at_yahoo.com> wrote in message news:2siRb.564$Er.32037_at_mencken.net.nih.gov...
> Hi,
>
> I'm trying to run a pl/sql script from linux command line (Red Hat 9) as
> follows:
>
> sqlplus username/password @ script.sql
>
> The problem is, after the script gets executed I stay in sqlplus environment
> (unless I have "exit;" in script.sql as the last line).
> Is there any way to auto-exit from sqlplus after the script has been
> executed? Appreciate the help!
>
> Thanks all
>
> Gordon
>
>

print "
connect user/pass
@script.sql
exit;
" | sqlplus

will exit the script .. no matter if script.sql has the exit in it or not...

Is this what you are asking for?

Anurag Received on Tue Jan 27 2004 - 07:20:54 CST

Original text of this message

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