Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: recreating a create database file

RE: recreating a create database file

From: Bob Metelsky <bmetelsky_at_cps92.com>
Date: Tue, 17 Jun 2003 14:20:03 -0700
Message-ID: <F001.005B3671.20030617134944@fatcity.com>


<popping my head out the window...>

Here is the create script I just did for 9i

[createdb.sql]

spool <DB_DESTINATION>\admin\<INSTANCE>\create\CreateDB.log set echo on

connect SYS/<PASSWORD> as SYSDBA
startup nomount
pfile="<DB_DESTINATION>\admin\<INSTANCE>\pfile\init<INSTANCE>.ora";

STORAGE(INITIAL 128K NEXT 128K MINEXTENTS 2 MAXEXTENTS 32); ALTER ROLLBACK SEGMENT BLD ONLINE; commit ;
-- NOTE-- SET THE SIZES OF THE
TABLESPACES BELOW TO MATCH YOUR DESIRED DATABASE CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE '<DB_DESTINATION>\oradata\<INSTANCE>\<INSTANCE>_TEMP01.dbf' SIZE 100M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
-- NOTE using the undo tablespace is a new feature of 9i and can
replace rollback segments.
-- The corresponding setting in the init<INSTANCE>.ora file
undo_management=manual or auto must be used. For the time being we are using conventional rollback segments
-- UNDO TABLESPACE "UNDOTBS1" DATAFILE

'<DB_DESTINATION>\oradata\<INSTANCE>\<INSTANCE>_undotbs01.dbf' SIZE 100M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED CREATE TABLESPACE "USERS" LOGGING DATAFILE '<DB_DESTINATION>\oradata\<INSTANCE>\<INSTANCE>_USERS01.dbf' SIZE 100M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;
ALTER TABLESPACE USERS ONLINE;
--CREATE TABLESPACE "TABLES" LOGGING DATAFILE
'<DB_DESTINATION>\oradata\<INSTANCE>\<INSTANCE>_tables1.dbf' SIZE 100M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED ;
--ALTER TABLESPACE TABLES ONLINE;
CREATE TABLESPACE "TABLES" LOGGING DATAFILE '<DB_DESTINATION>\oradata\<INSTANCE>\<INSTANCE>_TABLES01.dbf' SIZE 100M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;
ALTER TABLESPACE TABLES ONLINE;
--CREATE TABLESPACE "INDXS" LOGGING DATAFILE
'<DB_DESTINATION>\oradata\<INSTANCE>\<INSTANCE>_indx01.dbf' SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED ;
--ALTER TABLESPACE INDXS ONLINE;
CREATE TABLESPACE "INDXS" LOGGING DATAFILE '<DB_DESTINATION>\oradata\<INSTANCE>\<INSTANCE>_INDXS01.dbf' SIZE 50M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;
ALTER TABLESPACE INDXS ONLINE;
--CREATE TABLESPACE "REPORT" LOGGING DATAFILE
'<DB_DESTINATION>\oradata\<INSTANCE>\<INSTANCE>_REPORT01.dbf' SIZE 10M REUSE AUTOEXTEND ON NEXT 320K -MAXSIZE UNLIMITED ;
--ALTER TABLESPACE REPORT ONLINE;
CREATE TABLESPACE "REPORT" LOGGING DATAFILE '<DB_DESTINATION>\oradata\<INSTANCE>\<INSTANCE>_REPORT01.dbf' SIZE 1M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;
ALTER TABLESPACE REPORT ONLINE;
--CREATE TABLESPACE "XMLDB" LOGGING DATAFILE
'<DB_DESTINATION>\oradata\<INSTANCE>\<INSTANCE>_XMLdb01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED ;
--ALTER TABLESPACE XMLDB ONLINE;
CREATE TABLESPACE "XMLDB" LOGGING DATAFILE '<DB_DESTINATION>\oradata\<INSTANCE>\<INSTANCE>_XMLDB01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;
ALTER TABLESPACE XMLDB ONLINE; CREATE TABLESPACE "ROLLBACK_SEGS" DATAFILE '<DB_DESTINATION>\Oradata\<INSTANCE>\<INSTANCE>_ROLLBACK.DBF' SIZE 25M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED ; ALTER TABLESPACE ROLLBACK_SEGS ONLINE;
spool off

Create users and add permissions here...

CREATE ROLLBACK SEGMENT RS_01A
TABLESPACE ROLLBACK_SEGS
STORAGE(
   INITIAL 128K
   NEXT 128K
   OPTIMAL 2M
   MINEXTENTS 2
   MAXEXTENTS 32); CREATE ROLLBACK SEGMENT RS_01B
TABLESPACE ROLLBACK_SEGS
STORAGE(
   INITIAL 128K
   NEXT 128K
   OPTIMAL 2M
   MINEXTENTS 2
   MAXEXTENTS 32); CREATE ROLLBACK SEGMENT RS_02A
TABLESPACE ROLLBACK_SEGS
STORAGE(
   INITIAL 128K
   NEXT 128K
   OPTIMAL 2M
   MINEXTENTS 2
   MAXEXTENTS 32); CREATE ROLLBACK SEGMENT RS_02B
TABLESPACE ROLLBACK_SEGS
STORAGE(
   INITIAL 128K
   NEXT 128K
   OPTIMAL 2M
   MINEXTENTS 2
   MAXEXTENTS 32); CREATE ROLLBACK SEGMENT RS_03A
TABLESPACE ROLLBACK_SEGS
STORAGE(
   INITIAL 128K
   NEXT 128K
   OPTIMAL 2M
   MINEXTENTS 2
   MAXEXTENTS 32); CREATE ROLLBACK SEGMENT RS_03B
TABLESPACE ROLLBACK_SEGS
STORAGE(
   INITIAL 128K
   NEXT 128K
   OPTIMAL 2M
   MINEXTENTS 2
   MAXEXTENTS 32); CREATE ROLLBACK SEGMENT RS_04A
TABLESPACE ROLLBACK_SEGS
STORAGE(
   INITIAL 128K
   NEXT 128K
   OPTIMAL 2M
   MINEXTENTS 2
   MAXEXTENTS 32); CREATE ROLLBACK SEGMENT RS_04B
TABLESPACE ROLLBACK_SEGS
STORAGE(
   INITIAL 128K
   NEXT 128K
   OPTIMAL 2M
   MINEXTENTS 2
   MAXEXTENTS 32); CREATE ROLLBACK SEGMENT RS_LRG
TABLESPACE ROLLBACK_SEGS
STORAGE(
   INITIAL 10M
   NEXT 10M
   OPTIMAL 20M
   MINEXTENTS 2
   MAXEXTENTS 32);

ALTER ROLLBACK SEGMENT "RS_01A" ONLINE;
ALTER ROLLBACK SEGMENT "RS_01B" ONLINE;
ALTER ROLLBACK SEGMENT "RS_02A" ONLINE;
ALTER ROLLBACK SEGMENT "RS_02B" ONLINE;
ALTER ROLLBACK SEGMENT "RS_03A" ONLINE;
ALTER ROLLBACK SEGMENT "RS_03B" ONLINE;
ALTER ROLLBACK SEGMENT "RS_04A" ONLINE;
ALTER ROLLBACK SEGMENT "RS_04B" ONLINE;
ALTER ROLLBACK SEGMENT "RS_LRG" ONLINE;

spool off

connect SYSTEM/<PASSWORD>
set echo on
spool <DB_DESTINATION>\admin\<INSTANCE>\create\sqlPlusHelp.log @<ORACLE_HOME>\sqlplus\admin\help\hlpbld.sql helpus.sql; spool off

Hth

bob
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Bob Metelsky
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services

---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Jun 17 2003 - 16:20:03 CDT

Original text of this message

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