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: building Oracle using scripts

Re: building Oracle using scripts

From: Mark & Kristi Wagoner <mwagoner_at_iac.net>
Date: Mon, 25 Feb 2002 18:00:56 -0500
Message-ID: <a5efn9$2m3b$1@genma.iac.net>


You can do this, but you run into problems if the disk space varies between machines. For example, on one machine you create a large data file in /u01 but on another machine there is not enough space so it needs to go on /u02. Then you may also have to resize the objects that are going into the tablespaces.

Because of this I ended up writing an app that reads the available disks space, then tries to do a "best-fit" for the data files. The user then has the option to change any of these because of other unknown factors (such as two disks on the same controller). The app then wrote out the init file and a simple SQL script containing the CREATE DATABASE statement and called SQL*Plus to run it. Once that finished the app logged into the database and created the remaining tablespaces, executed the CREATE SCHEMA statement, then populated the lookup tables.

It was a lot of work, and it was still easy to break, but it worked. We tried to keep each machine as similar as possible, and the database schema didn't vary at all. That made it somewhat easier.

Good luck.

"KJ" <khash23_at_yahoo.com> wrote in message news:b0aeaa0d.0202251434.1db17adb_at_posting.google.com...
> Database:
>
> I want to be able to recreate a database (oracle 9 i) used by our
> project. What sort of scripts do I need to write in order to create a
> new database instance from assuming any of the following initial
> states:
> 1. Bare machine(Solaris or Linux) with no database software installed.
> 2. Bare machine(Solaris, or Linux) with only Oracle 9i installed on
> it.
> 3. Running database instance, with no application schema
> 4. Running database instance with loaded schema , but missing test
> data
>
> So for instace, someone can get a script from CVS and type build_db
> and build the whole database.
>
>
> I just need to be pointed to the right direction. What would be a good
> strategy? Has anyone done this? What sort of scripting language do I
> use for this?
>
> Also for case 1 above: Can I install oracle 9i on a given Solaris box
> using Oracle's installer and then copy the appropriate directories ( I
> think everything under /apps and /oracledata/) to a different
> Solaris box and get it working? That way we won't have to do a full
> install for every box. Your thought on this please?
>
> Many Thanks!
Received on Mon Feb 25 2002 - 17:00:56 CST

Original text of this message

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