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: How To Execute Sqlplus Scripts At The Command Line

Re: How To Execute Sqlplus Scripts At The Command Line

From: Luc Gyselinck <Luc.Gyselinck_at_nospampandora.be>
Date: Wed, 12 Jan 2005 21:10:56 GMT
Message-ID: <AngFd.29085$s14.2646140@phobos.telenet-ops.be>


What happens ? It hangs ? Never ends ?
Put an exit at the end of your test.sql script:

| //File: test.sql
| SELECT *
|  FROM dba_tablespaces;
|
| exit

"aleatory" <aleatory_at_hotmail.com> wrote in message news:a68a4ee0.0501111531.c128a8_at_posting.google.com...
> Hi Oracle masters,
>
> I have a question on sqlplus. How could I execute
> my sqlplus scripts at the command line? It would
> be great if I could get output files just executing
> shell scripts at the command line.
>
> I've tried some of the tips described in the book
> "Beginning Oracle Programming," but have been no
> luck yet.
>
> The following files, "test.ksh," and "test.sql" are
> the ones I use for this purpose:
>
> | //File: test.ksh
> | #!/usr/bin/ksh
> |
> | sqlplus -S '/as sysdba'
> | sqlplus -S userID/password @test.sql
>
> | //File: test.sql
> | SELECT *
> | FROM dba_tablespaces;
>
> It would be great if I could do the following at the
> command line:
>
> | $ ./test.ksh > out_test
>
> Finally, I use AIX 4.3 and Oracle 8i Enterprise Edition
> for this.
>
> Many thanks in advance,
>
> alea
Received on Wed Jan 12 2005 - 15:10:56 CST

Original text of this message

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