Re: [Fwd: SQL Plus Command Line Parameters in 7.3.3.2]
From: Chris Hamilton <toneczar_at_erols.com>
Date: 1998/01/20
Message-ID: <6a2bum$otq$1_at_goo.usace.army.mil>#1/1
Date: 1998/01/20
Message-ID: <6a2bum$otq$1_at_goo.usace.army.mil>#1/1
Mike van Thiel wrote ...
>sqlplus userid=john password=doe inputfile=runthissql.sql
>i.e. Trying to exeute sql from a command line without actually going
>into sqlplus.
The syntax is:
% sqlplus john/doe _at_runthis.sql
There aren't too many command line options. The "-s" option specifies "silent" mode - no banners, no prompts, etc.
% sqlplus -s john/doe _at_runthis.sql
You can add arguments to variables in the script at the command line, if the variables are named &1, &2, etc.
% sqlplus john/doe _at_runthis.sql 33 SMITH
This would run the script and insert the values "33" and "SMITH" into the substitution variables &1 and &2.
Chris Received on Tue Jan 20 1998 - 00:00:00 CET