Databases Reference
In-Depth Information
Table 2-1. ( continued )
Best Practice
Reasoning
Name the control files with the pattern
/<mount_point>/dbfile/<database_name>/control0N.ctl .
This deviates slightly from the OFA standard.
I find this location easier to navigate to, as
opposed to being located under ORACLE_BASE .
Use at least two control files, preferably in different
locations, using different disks.
If one control file becomes corrupt, it's always a
good idea to have at least one other control file
available.
Step 3: Create the Required Directories
Any OS directories referenced in the parameter file or CREATE DATABASE statement must be created on the server
before you attempt to create a database. For instance, in the previous section's initialization file, the control files are
defined as
control_files=(/u01/dbfile/o12c/control01.ctl,/u02/dbfile/o12c/control02.ctl)
From the previous line, ensure that you've created the directories /u01/dbfile/o12c and /u02/dbfile/o12c
(modify this according to your environment). In Linux/Unix you can create directories, including any parent
directories required, by using the mkdir command with the p switch:
$ mkdir -p /u01/dbfile/o12c
$ mkdir -p /u02/dbfile/o12c
Also make sure you create any directories required for data files and online redo logs referenced in the CREATE
DATABASE statement (see step 4). For this example, here are the additional directories required:
$ mkdir -p /u01/oraredo/o12c
$ mkdir -p /u02/oraredo/o12c
If you create the previous directories as the root user, ensure that the oracle user and dba groups are properly
set to own the directories, subdirectories, and files. This example recursively changes the owner and group of the
following directories:
# chown -R oracle:dba /u01
# chown -R oracle:dba /u02
Step 4: Create the Database
After you've established OS variables, configured an initialization file, and created any required directories, you can
now create a database. This step explains how to use the CREATE DATABASE statement to create a database.
Before you can run the CREATE DATABASE statement, you must start the background processes and allocate
memory via the STARTUP NOMOUNT statement:
$ sqlplus / as sysdba
SQL> startup nomount;
 
 
Search WWH ::




Custom Search