Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to execute an Oracle Script

Re: How to execute an Oracle Script

From: Ed Prochak <edprochak_at_adelphia.net>
Date: Thu, 10 Oct 2002 17:20:33 GMT
Message-ID: <3DA5B962.6010503@adelphia.net>


Juerg Keller wrote:
> Hi
>
> Yes, I am a newbie, and I can't find any answer in the Oracle
> documentation.
>
> I have the following file and I want to execute it. How/where can I do
> it? I tried it with SQL*Plus Worksheet but I just get syntax errors.
>
> The file is called 'CreateDB' and the content looks like this:
>
> #
> # Initialize OWENA-database
> #
>
> print "All tables of database $1 will be dropped. Do you want to
> continue (Y/N)?"
> read answer
>
> if [[ $answer == "Y" || $answer == "y" ]]; then
> print "Please wait ..."
> else
> return 1
> fi
>
> if PreCreate $@
> then
> cd ../src
>
> database=${3:-""}
> if [[ $database == "" || $database == "dummy" ]]; then
> CreateOWENA.nosid $1 $2
> ../install/PostCreate
>
> cd ../data
> LoadData.nosid $1 $2
> else
> CreateOWENA $1 $2 $3
> ../install/PostCreate
>
> cd ../data
> LoadData $1 $2 $3
> fi
> fi
>
>
> So, how do I execute it?? (We use Oracle 8.1)
>
> Thanks,
>
> Juerg

It is not an ORACLE script beyond the sense that Oracle supplied it. It is a unix shell script. so run it from the command line. (Hint: the "cd ../src" gives it away.)

HTH
    Ed Received on Thu Oct 10 2002 - 12:20:33 CDT

Original text of this message

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