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: running SQL scripts in UNIX

Re: running SQL scripts in UNIX

From: George Dau <gedau_at_pobox.com>
Date: Fri, 05 Jun 1998 00:40:07 GMT
Message-ID: <35773db0.268809026@isappp>


bmolish_at_my-dejanews.com wrote:

]If I create an SQL script, do I have to be in svrmgrl or sqlplus to invoke it?
]These scripts will not be updating the database, but creating various
]directories.
]I am using Oracle 7.3.2 on an HP UX box.

I use one of two ways to do this, depending on how the sqlplus is generated.

If the sqlplus is already in another file, use:

sqlplus / @sqlplusfile

If the sqlplus is in the same file as the script, use a here document:

sqlplus / <<SQL
select * from dual;
exit;
SQL --

 ,-,_|\   George Dau,                                             __
/    * \  Unix (Solaris, DEC Unix, Linux), Oracle, Internet.     (OO)
\_,--\_/  Home: gedau_at_pobox.com      Work: gedau_at_isa.mim.com.au ( \/ )
      v   WWW:  http://pobox.com/~gedau                          W--W
Received on Thu Jun 04 1998 - 19:40:07 CDT

Original text of this message

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