* Running SQLPLUS commands from a UNIX script
@ 1999-07-20 17:10 masauso zimba
0 siblings, 0 replies; only message in thread
From: masauso zimba @ 1999-07-20 17:10 UTC (permalink / raw)
To: tru64-unix-managers
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: multipart/mixed; boundary="--------------605FFB9F63207E531346EBE3", Size: 2335 bytes --]
--------------605FFB9F63207E531346EBE3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
At our site, we are running ORACLE 7.3.4 and we would like to automate
running SQLPLUS command scripts. For example the following sqlplus
script (list_suppliers.sql);
select supplier_no,supplier_name from suppliers;
can be executed from the SQLPLUS command line , @list_suppliers. When I
want to execute this sqlplus script from a UNIX script (sup_list);
#!/bin/sh
#
sqlplus user/password
@list_suppliers
exit
#
#
To execute this script from UNIX prompt;
$ ./sup_list
The result is that the script executes the "sqlplus user/password"
command only and remains at the SQLPLUS command prompt.
What is the correct syntax to enable execution of SQLPLUS commands
within UNIX scripts ?
Thanking you in advance.
Masauso Zimba.
--------------605FFB9F63207E531346EBE3
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
<FONT SIZE=-1>At our site, we are running ORACLE 7.3.4 and we would like
to automate running SQLPLUS command scripts. For example the following
sqlplus script (list_suppliers.sql);</FONT><FONT SIZE=-1></FONT>
<P><FONT SIZE=-1>select supplier_no,supplier_name from suppliers;</FONT><FONT SIZE=-1></FONT>
<P><FONT SIZE=-1>can be executed from the SQLPLUS command line , @list_suppliers.
When I want to execute this sqlplus script from a UNIX script (sup_list);</FONT><FONT SIZE=-1></FONT>
<P><FONT SIZE=-1>#!/bin/sh</FONT>
<BR><FONT SIZE=-1>#</FONT>
<BR><FONT SIZE=-1>sqlplus user/password</FONT>
<BR><FONT SIZE=-1>@list_suppliers</FONT>
<BR><FONT SIZE=-1>exit</FONT>
<BR><FONT SIZE=-1>#</FONT>
<BR><FONT SIZE=-1>#</FONT><FONT SIZE=-1></FONT>
<P><FONT SIZE=-1>To execute this script from UNIX prompt;</FONT><FONT SIZE=-1></FONT>
<P><FONT SIZE=-1>$ ./sup_list</FONT><FONT SIZE=-1></FONT>
<P><FONT SIZE=-1>The result is that the script executes the "sqlplus user/password"
command only and remains at the SQLPLUS command prompt.</FONT><FONT SIZE=-1></FONT>
<P><FONT SIZE=-1>What is the correct syntax to enable execution of SQLPLUS
commands within UNIX scripts ?</FONT><FONT SIZE=-1></FONT>
<P><FONT SIZE=-1>Thanking you in advance.</FONT><FONT SIZE=-1></FONT>
<P><FONT SIZE=-1>Masauso Zimba.</FONT></HTML>
--------------605FFB9F63207E531346EBE3--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-07-20 17:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-07-20 17:10 Running SQLPLUS commands from a UNIX script masauso zimba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox