Beruflich Dokumente
Kultur Dokumente
There are five steps to creating a useable database: three steps to create a
database and tow
additional steps to make it usable.
1. Setting Environment
Before a database is created, the UNIX environment must be configured and the
Oracle9i server
must have already been installed.
Four environment variables need to be set: ORACLE_HOME, ORACLE_SID, PATH.
ORACLE_HOME is the full path to the top directory in which the Oracle9i Server is
installed. The
directory for ORACLE_HOME should be supplied by the person who installed the
server, usually the
Unix administrator or the DBA.
2. Editing initsid.ora
Edit/Create initsid.ora
The initsid.ora file, a user configured text file, is read each time the database starts. The
parameters in the file initialize the database settings. The parameter settings in the initsid.ora
file affect not only the database at startup but also how the database is created.
When the Oracle9i server is installed a sample init.ora file is placed in $ORACLE_HOME/dbs.
Keep this file as a backup and do not modify it, create a copy of the file containing the name of the
ORACLE_SID.
Example:
$ cd $ORACLE_HOME/dbs
$ cp init.ora initdb01.ora
There are a few parameters that should be configured; these include db_name, control_files,
background_dump_dest, user_dump_dest, core_dump_dest, and undo_management
The db_name is the name of the database, which is used for a different purpose than ORACLE_SID.
The ORACLE_SID is the name used to designate an instance of the database. Many times the
db_name and ORACLE_SID are the same but it is not required.
The control_files initialization parameter designates the full path and filename of each
controlfile for the database. For the creation of the database, it identifies the controlfiles that need
to be created.
The undo_management initialization parameter determines whether the Oracle server
automatically or the DBA manually handles undo data. Set undo_management to AUTO in the
initialization file.
After setting the environment and configuring the initsid.ora the database can be created. An
Oracle database is created by executing a CREATE DATABASE command. The CREATE DATABASE
command, specifies the number and location of the logfiles, the location and size of the SYSTEM
tablespace, UNDO tablespace, and TEMP tablespace
4. Running Scripts
5. Running pupbld.sql
The script pupbld.sql, located in directory $ORACLE_HOME/sqlplus/admin, creates the Product
User Profile table and related procedures. Running this script among other purposes, prevents a
warning message each time a user connects to SQL*Plus. The script must be run as user SYSTEM