Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: auto-exit pl/sql script from command line?
"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