Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: running SQL scripts in UNIX
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--WReceived on Thu Jun 04 1998 - 19:40:07 CDT