Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> How To Execute Sqlplus Scripts At The Command Line
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 Tue Jan 11 2005 - 17:31:03 CST