Databases Reference
In-Depth Information
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's 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
See the section “Setting OS Variables,” earlier in this chapter, for a complete description of these variables and
techniques for setting them.
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:
spfile )
Server parameter binary file (
init.ora text file
Oracle recommends that you use an spfile for reasons such as these:
spfile with the SQL ALTER SYSTEM statement.
You can modify the contents of the
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:
You can directly edit it with an OS text editor.
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:
You can place comments in it that detail a history of modifications.
db_name=o12c
db_block_size=8192
memory_target=300M
memory_max_target=300M
processes=200
control_files=(/u01/dbfile/o12c/control01.ctl,/u02/dbfile/o12c/control02.ctl)
job_queue_processes=10
open_cursors=500
fast_start_mttr_target=500
undo_management=AUTO
undo_tablespace=UNDOTBS1
remote_login_passwordfile=EXCLUSIVE
 
Search WWH ::




Custom Search