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 23:36:04 GMT
Message-ID: <EBCRb.11812$ll4.7441@news01.roc.ny>

"hastenthunder" <hastenthunder_at_yahoo.com> wrote in message news:TfuRb.565$Er.32018_at_mencken.net.nih.gov...
>
> "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?
>
>

.. oh sorry ..
that was a ksh example.

.. but you get the pretty simple idea?

Anurag Received on Tue Jan 27 2004 - 17:36:04 CST

Original text of this message

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