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?
"Anurag Varma" <avdbi_at_hotmail.com> wrote in message
news:WAtRb.11709$kD2.1893_at_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
>
>
Yes, where should I execute the print "connect usr/pass @script.sql exit; "
| sqlplus ?
at command prompt or in a perl script?
Received on Tue Jan 27 2004 - 08:06:43 CST