Re: SqlPlus Question

From: Galen Boyer <gboyer_at_exapp.com>
Date: 1997/04/06
Message-ID: <01bc4247$82c39be0$8780f3ce_at_gboyer.exapps.com>#1/1


Yes you can.

Assume that you have two files that you want to execute, one after the other. file1.sql and file.sql.

The manual to run them is to log into sqlplus and type _at_file1; then _at_file2;. Oracle will then look in the directory which you entered sqlplus from and any other ones that are specified in its ORACLE_PATH enviromental variable (this is assuming you are running on a UNIX machine. Sqlplus will find the file file1.sql and file2.sql and pipe them through PL/SQL. The way to automate this is to construct a script which logs into sqlplus and runs _at_filename.

In UNIX the script would look like
sqlplus id/passwd << EOSQL
_at_file1;
_at_file2;
EOSQL Bob Malos <gateway_at_gold.tc.umn.edu> wrote in article <gateway.119.0052CB78_at_gold.tc.umn.edu>...
> We have an ad-hoc query tool for the Web that was built to work with
 SYBASE
> databases. The CGI scripts just build some SQL and then run it in a
 'batch'
> mode via SYBASE's ISQL utility.
>
> I'm wondering whether we can do the same thing with SqlPlus. With ISQL
 you can
> actually invoke it from a command line like this:
> ISQL -SSYBASE -Uxxxx -Pxxxx -i input.txt -o output.txt
> This takes the SQL that's in 'input.txt' and runs it, putting the output
 in
> 'output.txt'. (then the CGI script just reads the output file)
>
> Also - we often have several of these ISQL sessions running concurrently
> (using different UserIDs). Our platform is OS/2 and I know that SQL*Plus
 is
> available for OS/2.
>
> Bob Malos - Univ of Minnesota - malos001_at_tc.umn.edu
>
  Received on Sun Apr 06 1997 - 00:00:00 CEST

Original text of this message