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: <mpir_at_compuserve.com>
Date: Fri, 05 Jun 1998 06:34:43 GMT
Message-ID: <6l83i3$qah$1@nnrp1.dejanews.com>


In article <35773db0.268809026_at_isappp>,   gedau_at_pobox.com (George Dau) wrote:
>
> bmolish_at_my-dejanews.com wrote:
>
> ]If I create an SQL script, do I have to be in svrmgrl or sqlplus to invoke it?

    Yes, if they are sql statments

> ]These scripts will not be updating the database, but creating various
> ]directories.

The scripts are not sql, but shell scripts (Korn, Bourne, C or Bash?) if they create 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
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Fri Jun 05 1998 - 01:34:43 CDT

Original text of this message

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