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 -> How to execute an Oracle Script

How to execute an Oracle Script

From: Juerg Keller <simsy_at_gmx.ch>
Date: 7 Oct 2002 07:36:46 -0700
Message-ID: <2d9517a4.0210070636.29600ea7@posting.google.com>


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 - 09:36:46 CDT

Original text of this message

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