Document ID:        33179.1
Subject:            WIN95: CREATING AN ORACLE DATABASE V7.2
Last Modified:      25 April 1997
Author:             MFOWLER


This bulletin explains the steps necessary to create a database and the files
contained therein.  There can only be one database running at one time.
However, you can have multiple sets of database files and you can bring them
up at separate times with little intervention.

A.   Setting Registry Parameters

The registry provides program variables much in the same way as the
autoexec.bat and config.ora do in DOS, or the win.ini and oracle.ini in
Windows.

One should use caution in editing the registry.  Your system may not boot up
if you inadvertently modify a critical system parameter.  Before editing this
file you may want to view the 'Help' in the registry.  Review the topics,
"Exporting all or part of the registry to a text file", "Importing some or
all of the registry", and "Restoring the registry".

Before creating the database, you will need to remove the 'autostart'
variable and set the new 'SID' variable in registry.

     1.  Run \win95\regedit.exe
     2.  Select HKEY_LOCAL_MACHINE
     3.  Select SOFTWARE
     4.  Select ORACLE
     5.  Select DATABASE_STARTUP
     6.  Delete string (AUTO)
     7.  Press Okay
     8.  Select 'ORACLE_SID'
     9.  Add the name of your new sid.
    10.  Press Okay

B.  Setting the Database Password

From a command prompt, or from the 'Start' 'Run' selection, you will need to
run the password manager and set the database password.
\ORAWIN95\BIN\ORAPWD72  FILE=\ORAWIN95\DATABASE\PWD.ORA
PASSWORD=
Where  is your instance name, and  is your new database password
used for connecting INTERNAL.

C.  Create your INIT.ORA

Copy \ORAWIN95\DATABASE\INITORCL.ORA   \ORAWIN95\DATABASE\INIT.ORA
Edit the init.ora and change the 'db_name' and 'control_files'
parameters.
     a) The 'db_name' is not dependent on the , but may reduce
        confusion if it is made the same.
     b) The control_files should be set to reflect .  ie.
                 C:\ORAWIN95\DATABASE\ctl.ora

D.  Creating the Database

Run SQLDBA
     \ORAWIN95\BIN\SQLDBA72

     CONNECT INTERNAL/
     STARTUP NOMOUNT

     CREATE DATABASE;
This will create the specified control file(s), and the system tablespace
with the default name of DBS1.ORA with a size of 6.144,512 MB.

You may desire to create a larger initial system datafile, and different file
name.  This can be done during the create database. ie.
     CREATE DATABASE
     DATAFILE '\ORAWIN95\DATABASE\SYS1.ORA' SIZE 20M;

Please refer your Oracle7 Server Administrator's Guide  and your Oracle7
Server SQL Language Reference Manual for more information on 'Create
Database'.

You must now run catalog.sql and catproc.sql to create the necessary database
objects and views, and to give the Procedural Option functionality.
     @\ORAWIN95\RDBMS72\ADMIN\CATALOG
     @\ORAWIN95\RDBMS72\ADMIN\CATPROC

*If you did not change the 'ORACLE_SID' value in the registry, then you must
 bring up a command prompt, and set the value and run the commands from the
 same command prompt.
     SET ORACLE_SID=NEW  (Where 'NEW' is the name of your new sid.)