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: Ed Stevens <nospam_at_noway.nohow>
Date: Wed, 12 Jan 2005 07:22:05 -0600
Message-ID: <g09au0toppcdome7ks9244mpu0h4epg33k@4ax.com>


On 11 Jan 2005 15:31:03 -0800, aleatory_at_hotmail.com (aleatory) wrote:

>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

Could you be a bit more specific about your definition of 'no luck'? I don't find that in any of the docs. You've shown us your code, but haven't described the behavior you're seeing or what you expected to see.

Without that, you're expecting us to have functioning crystal balls. Thanks.

Cohn's Law: The more time you spend in reporting on what you are doing, the less time you have to do anything. Stability is achieved when you spend all your time doing nothing but reporting on the nothing you are doing. Received on Wed Jan 12 2005 - 07:22:05 CST

Original text of this message

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