Re: Newbie Question
Date: 1996/08/02
Message-ID: <4tse35$2jj_at_sensible.teleord.co.uk>#1/1
Chris Gatto <Fredericton, NB, CANADA> wrote:
>Just getting started with an oracle 7.?. I've got the db
>server set up on my machine for the time being. The online help
>is very good at explaining steps B to Z, but not step A !.
>
>Step A: How in the world does one go about creating an oracle
> database ?
>
>I know this is really rudimentry stuff, but I am completely mystified
>(and, yes, a little frustrated).
Well, after you've done all your planning (because you wouldn't want to create a database without planning its use, would you now??), you need to follow these steps (note that this is a very simplistic view, you really need to understand stuff about redo logs, rollback segments, database parameters, tablespaces etc. before doing this):
- set your ORACLE_SID and ORACLE_HOME environment variables, e.g
export ORACLE_SID=live
export ORACLE_HOME=/home/oracle
2. Define your init.ora file
This is a bit complex to explain here, but you could just copy the default one provided by Oracle. The init.ora files reside in $ORACLE_HOME/dbs. Call yours init$ORACLE_SID.ora.
3. Create the database
Then, in SQL*DBA, do something like:
CONNECT INTERNAL
STARTUP NOMOUNT
CREATE DATABASE live
MAXINSTANCES 1
MAXDATAFILES 40
MAXLOGFILES 16
DATAFILE 'SYSDIR/dbs1NAME.dbf' SIZE 20M LOGFILE 'LOGDIR/log1NAME.dbf' SIZE 1M, 'LOGDIR/log2NAME.dbf' SIZE 1M, 'LOGDIR/log3NAME.dbf' SIZE 1M;
SHUTDOWN IMMEDIATE
STARTUP
4. Create the data dictionary
Once again in SQL*DBA, do something like:
SHUTDOWN IMMEDIATE
DISCONNECT
CONNECT INTERNAL
STARTUP OPEN
REM create the data dictionary
_at_$ORACLE_HOME/rdbms/admin/catalog.sql
REM create views for Export/Import
_at_$ORACLE_HOME/rdbms/admin/catexp
REM create views for SQL*Loader
_at_$ORACLE_HOME/rdbms/admin/catldr
REM create data dictionary for procedures and triggers _at_$ORACLE_HOME/rdbms/admin/catproc
REM create data dictionary synonyms for system
CONNECT system/manager
_at_$ORACLE_HOME/rdbms/admin/catdbsyn.sql
5. Create some rollback segments
This time lets use SQL*Plus, and do something like:
CREATE ROLLBACK SEGMENT temp TABLESPACE system;
ALTER ROLLBACK SEGMENT temp ONLINE;
CREATE ROLLBACK SEGMENT rs_1
TABLESPACE &1
STORAGE (
initial 1M next 500K minextents 2 maxextents 99 optimal 2M )
/
ALTER ROLLBACK SEGMENT rs_1 ONLINE;
6. Create your tablespaces 7. Create your users 8. Create your objects -- # Mark Styles aka Small -- Opinions expressed here are my own -- # # lambic_at_msn.com -- unless otherwise specified -- ## So... have you ever seen a picture of a diseased gall bladder? # Received on Fri Aug 02 1996 - 00:00:00 CEST