Re: Quit SQLPLUS without exit?
Date: 3 Oct 2001 13:36:35 -0700
Message-ID: <3d0cf525.0110031236.3c0fb737_at_posting.google.com>
dparke_at_acxiom.com (Donna Parker) wrote in message news:<d3dff5cd.0110011056.5747128f_at_posting.google.com>...
> sunny313_at_hotmail.com (Sunny Singh) wrote in message news:<f3f27ff5.0109281323.134ad59e@posting.google.com>...
> > postbus_at_sybrandb.demon.nl (Sybrand Bakker) wrote in message news:<a20d28ee.0109280505.7e6a6058_at_posting.google.com>...
> > > sunny313_at_hotmail.com (Sunny Singh) wrote in message news:<f3f27ff5.0109271852.62ef0582_at_posting.google.com>...
> > > > I want to execute a .sql file to (create a procedure) and exit out
> > > > after that, without using 'exit;' in the .sql file or SQL prompt.
> > > > Please help.
> > >
> > > If you don't have an explicit exit, sqlplus will issue an implicit exit.
> > > What do you want to accomplish? The impossible?
> > >
> > > Regards,
> > >
> > > Sybrand Bakker, Senior Oracle DBA
> >
> > 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.
>
>
> SQL*Plus will exit without an exit if called this way:
>
> sqlplus user/password<<-EOF
> _at_script.sql
> EOF
I would go one more step and imbed the user/password in the here-document and say:
sqlplus /nolog<<-EOF
connect user/password
_at_script.sql
EOF
this hides the user/password from view on UNIX systems.
Received on Wed Oct 03 2001 - 22:36:35 CEST