Re: Help: Creating DB from scipts on NT?

From: Bert Scalzo <bscalz01_at_7-11.com>
Date: 1998/06/02
Message-ID: <6l12vm$42t$1_at_news.ses.cio.eds.com>#1/1


Alex,

Below is a script I have used to do exactly what you want. It may require a few changes (I used this for a 7.3 instance on NT 4.0). I merely ran this from Oracle's command line utility "server manager" in 7.3. You should be able to run it under sqldba on 7.1. Let me know ...

Bert Scalzo
Oracle DBA
EDS



spool c:\temp\make_db.log

connect internal

startup nomount pfile=C:\ORANT\DATABASE\initorcl.ora

create database oracle

    controlfile reuse

    logfile  'c:\ORANT\DATABASE\log1orcl.ora' size 1M reuse,
             'c:\ORANT\DATABASE\log2orcl.ora' size 1M reuse
    datafile 'c:\ORANT\DATABASE\sys1orcl.ora' size 16M reuse
        autoextend on next 16M maxsize 128M
    character set WE8ISO8859P1;

create rollback segment rbs_temp

    storage (initial 64K next 64K optimal 256K); alter rollback segment rbs_temp online;

create tablespace user_data

    datafile 'c:\ORANT\DATABASE\usr1orcl.ora' size 16M reuse

        autoextend on next 8M maxsize 128M; create tablespace rollback_data

    datafile 'c:\ORANT\DATABASE\rbs1orcl.ora' size 8M reuse

        autoextend on next 8M maxsize 32M; create tablespace temporary_data

    datafile 'c:\ORANT\DATABASE\tmp1orcl.ora' size 8M reuse

        autoextend on next 8M maxsize 32M;

alter user sys identified by mgr;
alter user sys temporary tablespace temporary_data; alter user sys default tablespace system;

alter user system identified by manager; alter user system temporary tablespace temporary_data; alter user system default tablespace user_data;

create public rollback segment rbs1

    storage(initial 256K next 256K optimal 1M)     tablespace rollback_data;
alter rollback segment rbs1 online;
create public rollback segment rbs2

    storage(initial 256K next 256K optimal 1M)     tablespace rollback_data;
alter rollback segment rbs2 online;

alter rollback segment rbs_temp offline; drop rollback segment rbs_temp;

_at_%rdbms73%\admin\catalog.sql
_at_%rdbms73%\admin\catalog6.sql
_at_%rdbms73%\admin\catproc.sql

grant execute on dbms_lock to public;
grant execute on dbms_pipe to public;
grant execute on dbms_alert to public;

connect system/manager

_at_%rdbms73%\admin\catdbsyn.sql
_at_%oracle_home%\dbs\pupbld.sql

connect internal

_at_%rdbms73%\admin\catrep.sql

grant execute on dbms_defer to public;

alter package dbms_snapshot compile body;

shutdown;

spool off

exit Received on Tue Jun 02 1998 - 00:00:00 CEST

Original text of this message