Re: How to quit sqlplus without any exit/quit
Date: 3 Oct 2001 06:45:45 -0700
Message-ID: <d3dff5cd.0110030545.6607572c_at_posting.google.com>
SQL*Plus will exit without an exit if called this way:
sqlplus user/password<<-EOF
_at_script.sql
EOF
You can type it this way from the prompt. You can also execute
multiple sql scripts in the same command and exit at the end of all if
none of the scripts have an exit
sqlplus user/password<<-EOF
_at_script1.sql
_at_script2.sql
EOF
postbus_at_sybrandb.demon.nl (Sybrand Bakker) wrote in message news:<a20d28ee.0110020009.5e150f5d_at_posting.google.com>...
> sunny313_at_hotmail.com (Sunny Singh) wrote in message news:<f3f27ff5.0110011002.3e8b09a9_at_posting.google.com>...
> > SQLPLUS will keep on sitting on its SQL prompt if no exit/quit is
> > found in .sql:
> > Please see below:
> >
> > $ sqlplus sa/sa_at_lyweb @cr_tab.sql
> >
> > SQL*Plus: Release 8.1.7.0.0 - Production on Fri Sep 28 14:19:41 2001
> >
> > (c) Copyright 2000 Oracle Corporation. All rights reserved.
> >
> >
> > Connected to:
> > Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
> > With the Partitioning option
> > JServer Release 8.1.7.0.0 - Production
> >
> >
> > Table created.
> >
> > SQL> (control stays here)...
> >
> > As you see, it did not exit. My question is How can we signal SQLPLUS
> > to exit without really saying EXIT in .sql file. SQLPLUS did not do an
> > implicit exit, as you can see.
> >
> > Any help is greatly appreciated.
> >
> > Thanks.
>
> Use this call in a .cmd or a .bat file and it definitely will exit!
> Otherwise just try not to forget typing those four letters.
>
> Hth,
>
> Sybrand Bakker, Senior Oracle DBA
>
> Sybrand
Received on Wed Oct 03 2001 - 15:45:45 CEST