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: Bricklen <bricklen_at_shaw.ca>
Date: Mon, 07 Oct 2002 15:04:15 GMT
Message-ID: <3DA1A0AB.226FAD07@shaw.ca>


That isn't a sql script, it's a shell script. Try it from your linux/unix command line.

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
Received on Mon Oct 07 2002 - 10:04:15 CDT

Original text of this message

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