--
-- $Header: build_db.sql 1.1 94/10/18 15:55:37 gdudey Osd<desktop/netware> $ Copyr (c) 1994 Oracle
--
-- This file must be run out of the directory containing the
-- initialization file.

startup nomount pfile=\%AVAILABLE_SID%\pfile\initsmpl.ora

--  Create database

create database %AVAILABLE_SID%
    controlfile reuse
    logfile '%seedl_path%\%AVAILABLE_SID%\redo01.log' size %seedl_size%M reuse,
            '%seedl_path%\%AVAILABLE_SID%\redo02.log' size %seedl_size%M reuse,
            '%seedl_path%\%AVAILABLE_SID%\redo03.log' size %seedl_size%M reuse,
            '%seedl_path%\%AVAILABLE_SID%\redo04.log' size %seedl_size%M reuse
    datafile '%seedd_path%\%AVAILABLE_SID%\system01.dbf' size %seedd_sysi_size%M reuse autoextend on
      next %seedd_syse_size%M maxsize %seedd_sysm_size%M 
    character set %seed_charset%;

create rollback segment rb_temp storage (initial 100 k next 250 k);

-- Create additional tablespaces ...

-- USERs: Create user sets this as the default tablespace
-- TEMP: Create user sets this as the temporary tablespace
-- RBS: For rollback segments

create tablespace users
    datafile '%seedd_path%\%AVAILABLE_SID%\users01.dbf' size %seedd_usri_size%M reuse autoextend on
      next %seedd_usre_size%M maxsize %seedd_usrm_size%M;
create tablespace rbs
    datafile '%seedd_path%\%AVAILABLE_SID%\rbs01.dbf' size %seedd_rbsi_size%M reuse autoextend on
      next %seedd_rbse_size%M maxsize %seedd_rbsm_size%M;
create temporary tablespace temp
    tempfile '%seedd_path%\%AVAILABLE_SID%\temp01.dbf' size %seedd_tmpi_size%M reuse autoextend on
      next %seedd_tmpe_size%M maxsize %seedd_tmpm_size%M;
create tablespace oem_repository
    datafile '%seedd_path%\%AVAILABLE_SID%\oemrep01.dbf' size %seedd_usri_size%M reuse autoextend on
      next %seedd_usre_size%M maxsize %seedd_usrm_size%M;
create tablespace indx
    datafile '%seedd_path%\%AVAILABLE_SID%\indx01.dbf' size %seedd_tmpi_size%M reuse autoextend on
      next %seedd_tmpe_size%M maxsize %seedd_tmpm_size%M;
--      next %seedd_usre_size%M maxsize %seedd_usrm_size%M;
alter rollback segment rb_temp online;

-- Change the SYSTEM users' password, default tablespace and
-- temporary tablespace.

alter user system temporary tablespace temp;
alter user system default tablespace users;

-- Create 16 rollback segments.  Allows 16 concurrent users with open
-- transactions updating the database. This should be enough.

create public rollback segment rb1 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb2 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb3 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb4 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb5 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb6 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb7 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb8 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb9 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb10 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb11 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb12 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb13 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb14 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb15 storage(initial 50K next 250K)
  tablespace rbs;
create public rollback segment rb16 storage(initial 50K next 250K)
  tablespace rbs;

