RelationalDBDesign RelationalDBDesign


DB Creation   «Prev 

Different Initialization Parameters

Oracle has literally dozens of initialization parameters that affect how your database operates. You should strive to become familiar with the parameters that are available, to enable yourself to recognize situations where you can leverage the functionality that they provide.
I have two suggestions that will help you learn about the various initialization parameters. The first is this: Find one or two initialization files from some production databases, read through them, and look up each parameter setting in the Oracle Reference Manual. Make sure that you understand why each parameter is being used. If necessary, ask a senior DBA to explain things to you.
My second suggestion is to sit down with the Oracle Reference Manual, and read through it. Briefly skim each parameter description. Even if you do not understand everything, this plants the material in your brain. You'll be surprised at what you will recall later when you need it.

Creating a Database

This section explains how to create an Oracle database manually with the SQL*Plus CREATE DATABASE statement. These are the steps required to create a database:
  1. Set the OS variables.
  2. Configure the initialization file.
  3. Create the required directories.
  4. Create the database.
  5. Create a data dictionary.
Each of these steps is covered in the following sections.

Step 1. Set the OS Variables

As mentioned previously, before you run SQL*Plus (or any other Oracle utility), you must set several OS variables. You can either manually set these variables or use a combination of files and scripts to set the variables. Here is an example of setting these variables manually:
$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0.1/db_1
$ export ORACLE_SID=o12c
$ export LD_LIBRARY_PATH=/usr/lib:$ORACLE_HOME/lib
$ export PATH=$ORACLE_HOME/bin:$PATH



Step 2: Configure the Initialization File

Oracle requires that you have an initialization file in place before you attempt to start the instance. The initialization file is used to configure features such as memory and to control file locations. You can use two types of initialization files:
  1. Server parameter binary file (spfile)
  2. init.ora text file
Oracle recommends that you use an spfile for reasons such as these:
  1. You can modify the contents of the spfile with the SQL ALTER SYSTEM statement.
  2. You can use remote-client SQL sessions to start the database without requiring a local (client) initialization file.
These are good reasons to use an spfile. However, some shops still use the traditional init.ora file. The init.ora file also has advantages:
  1. You can directly edit it with an OS text editor.
  2. You can place comments in it that detail a history of modifications.

When I first create a database, I find it easier to use an init.ora file. This file can be easily converted later to an spfile if required (via the CREATE SPFILE FROM PFILE statement). In this example my database name is o12c, so I place the following contents in a file named inito12c.ora and put the file in the ORACLE_HOME/dbs directory:
Table 6-10 lists best practices to consider when configuring an Oracle initialization file.
Table 6-10: Initialization File Best Practices