Create Database Script

There are DBCA templates located on mothsbane at D:\oracle\ora92\assistants\dbca\templates\
should the trapping database need to be created at another location. For historical reference, the Oracle 8i creation script is noted below:

CREATE DATABASE STS

         CONTROLFILE REUSE

         LOGFILE GROUP 1 '/muddle/oracle/sts/redo01sts.log,

                                                  /muddle/oracle/sts/redo02sts.log,

                                    /muddle/oracle/sts/redo03sts.log'  SIZE 5M REUSE,

         LOGFILE GROUP 2 ‘/orandx/oracle/sts/redo01sts.log,

                                                   /orandx/oracle/sts/redo02sts.log,

                                  /orandx/oracle/sts/redo03sts.log’  SIZE 5M REUSE,

     DATAFILE '/orandx/oracle/sts/system_1.dbf' REUSE
         AUTOEXTEND ON
         NEXT 20M MAXSIZE 300M

         MAXDATAFILES 255

     ARCHIVELOG;

-- Create another (temporary) system tablespace

CREATE ROLLBACK SEGMENT rb_temp STORAGE (INITIAL 100K NEXT 250k);

-- Alter temporary system tablespace online before proceding

ALTER ROLLBACK SEGMENT rb_temp ONLINE;

-- Create additional tablespaces ...

-- RBS: For rollback segments

-- USERs: Create user sets this as the default tablespace

--TEMP: Create user sets this as the temporary tablespace

CREATE TABLESPACE GEOREFERENCE_TS

      DATAFILE ‘/muddle/oracle/sts/georef01.dbf’ REUSE AUTOEXTEND ON
          NEXT 64K  MAXSIZE 2M

CREATE TABLESPACE GIS_TS

         DATAFILE '/muddle/oracle/sts/gis01.dbf’ REUSE AUTOEXTEND ON
         NEXT 64K MAXSIZE 10M;

CREATE TABLESPACE GMDATA_TS

         DATAFILE '/muddle/oracle/sts/gmdata01.dbf' REUSE AUTOEXTEND ON
         NEXT 5M MAXSIZE 300M;

CREATE TABLESPACE GMERRORS_TS
      DATAFILE '/muddle/oracle/sts/gmerrs01.dbf' REUSE AUTOEXTEND ON
         NEXT 5M MAXSIZE 150M;

CREATE TABLESPACE GM_HISTORICAL_TS

         DATAFILE ‘/muddle/oracle/sts/gmhist01.dbf’ REUSE AUTOEXTEND ON
         NEXT 20M MAXSIZE 300M;

CREATE TABLESPACE GMREFERENCE_TS

         DATAFILE ‘/muddle/oracle/sts/gmref01.dbf’ REUSE AUTOEXTEND ON
         NEXT 5M MAXSIZE 100M;

CREATE TABLESPACE GMROLL_TS

         DATAFILE ‘/muddle/oracle/sts/gmrollback01.dbf’ REUSE AUTOEXTEND ON
         NEXT 20M MAXSIZE 300M;

CREATE TABLESPACE GMSNAP_TS

         DATAFILE ‘/muddle/oracle/sts/gmsnap01.dbf’ REUSE AUTOEXTEND ON
         NEXT 20M MAXSIZE 300M;

CREATE TABLESPACE GMTEMP_TS

         DATAFILE ‘/muddle/oracle/sts/gmtemp01.dbf’ REUSE AUTOEXTEND ON
         NEXT 20M MAXSIZE 300M;

CREATE TABLESPACE GMTEST_TS

         DATAFILE ‘/muddle/oracle/sts/gmtest01.dbf’ REUSE AUTOEXTEND ON
         NEXT 20M MAXSIZE 300M;

CREATE TABLESPACE ORATOOLS_TS          DATAFILE ‘/muddle/oracle/sts/gmtools01.dbf’ REUSE AUTOEXTEND ON
              NEXT 5M MAXSIZE 100M; CREATE TABLESPACE GMUSER_TS          DATAFILE ‘/muddle/oracle/sts/gmuser01.dbf’ REUSE AUTOEXTEND ON
         NEXT 20M MAXSIZE 300M; CREATE TABLESPACE WEBDB_USER_TS      DATFFILE ‘/muddle/oracle/sts/webdb_user01.dbf’ REUSE AUTOEXTEND ON
         NEXT 5M MAXSIZE 100M; CREATE TABLESPACE GMINDEX_TS      DATAFILE ‘/orandx/oracle/sts/gmindex01.dbf’ REUSE AUTOEXTEND ON
         NEXT 20M MAXSIZE 300M;

-- Create rollback segments.

CREATE ROLLBACK SEGMENT RBLARGE_1 STORAGE(INITIAL 4M NEXT 4M) tablespace GMROLL_TS;

CREATE ROLLBACK SEGMENT RBLARGE_2 STORAGE(INITIAL 7M NEXT 7M) tablespace GMROLL_TS;

CREATE ROLLBACK SEGMENT RBLARGE_3 STORAGE(INITIAL 4M NEXT 4M) tablespace GMROLL_TS;

CREATE ROLLBACK SEGMENT RBLARGE_4 STORAGE(INITIAL 4M NEXT 4M) tablespace GMROLL_TS;

CREATE ROLLBACK SEGMENT RBLARGE_5 STORAGE(INITIAL 4M NEXT 4M) tablespace GMROLL_TS;

CREATE ROLLBACK SEGMENT RBLARGE_6 STORAGE(INITIAL 4M NEXT 4M) tablespace GMROLL_TS;

CREATE ROLLBACK SEGMENT RBLARGE_7 STORAGE(INITIAL 4M NEXT 4M) tablespace GMROLL_TS;

-- Bring new rollback segments online and drop the temporary system one

ALTER ROLLBACK SEGMENT RBLARGE_1 ONLINE;

ALTER ROLLBACK SEGMENT RBLARGE_2 ONLINE;

ALTER ROLLBACK SEGMENT RBLARGE_3 ONLINE;

ALTER ROLLBACK SEGMENT RBLARGE_4 ONLINE;

ALTER ROLLBACK SEGMENT RBLARGE_5 ONLINE;

ALTER ROLLBACK SEGMENT RBLARGE_6 ONLINE;

ALTER ROLLBACK SEGMENT RBLARGE_7 ONLINE;

ALTER ROLLBACK SEGMENT rb_temp OFFLINE;

DROP ROLLBACK SEGMENT rb_temp ;

   
  © 2012 Slow the Spread Foundation, Inc.  

Page developed and maintained by Virginia Tech

  Contact Us