Basics of User and Directory Requirements for Oracle 12c

By Chris Ruel, Michael Wessler

On UNIX- and Linux-based systems, including Oracle 12c, the software is installed and configured as a specific user and group. In most cases, the user is called oracle, the primary group oinstall, and the secondary group dba. Here’s a sample of how this user is defined:

$ id
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba))

On Windows systems, the software should be installed as a member of the Local Administrators group for the machine.

It’s common to have multiple versions of Oracle running on the same machine simultaneously. To avoid chaos, you need to organize how and where each version is installed. The framework commonly used to organize and install Oracle software is called Optimal Flexible Architecture (OFA). As the DBA, you can use this organizational hierarchy to install the Oracle software based on software versions and common directories used by all versions.

Key to the OFA is the directory environment variables ORACLE_BASE and ORACLE_HOME:

  • ORACLE_BASE is where you can find common software used by all Oracle software versions; it’s the base of underlying Oracle code trees.

  • ORACLE_HOME is a subdirectory and denotes the location where a specific version of Oracle database software is installed, often associated with one or more database instances.

Here’s the hierarchy:

/directory name/app/oracle/product/version number/actual software_version_number

Now let’s describe each level of the hierarchy.

Level Description
directory name Base directory, file system, or drive name.
app Directory name denoting application software will be located in
this tree.
oracle Owner of the software and is defined as ORACLE_BASE.
product Holding directory for software trees.
version number Directory with unique version number containing the actual
software installation. Defined as ORACLE_HOME.

Here’s an example of how this hierarchy may exist on UNIX or Linux:


And on Windows:


When you install the database software with the Oracle installation tool (Oracle Universal Installer), it guides you through identifying these locations, but, you need to understand why each location is defined so you can better organize your software installations.

In the ORACLE_BASE directory, an Oracle Inventory directory is created as oraInventory. Within this directory, Oracle logs a record of all Oracle software that has been installed, patched, and removed from the server. This information is used so that the Oracle Universal Installer (OUI) and the OPatch utility can track software dependencies during installation and patching operations. The Oracle Inventory is managed automatically by the OUI and OPatch utilities.

Underneath ORACLE_BASE is an admin directory with named subdirectories for each Oracle database, as well as backup, config tool logs, the Fast Recovery Area, and product directories:

admin backup cfgtoollogs diag fast_recovery_area product

Of particular importance, under each ORACLE_BASE/admin/database name subdirectory is directories for auditing, Data Pump configuration files, configuration, and Oracle Security Wallet files:

$ ls $ORACLE_BASE/admin/*
adump dpdump pfile xdb_wallet
adump dpdump pfile xbd_wallet

Below you see directories for auditing, Data Pump, configuration, and Oracle wallets.

Directory Purpose
adump Audit file location. Can generate many files, but are generally
not very large.
dpdump Location for Data Pump utility.
pfile Location for database startup configuration files.
xdb_wallet Oracle wallets storage area. These are security devices.

In previous versions of Oracle, bdump, cdump, and udump directories appeared underneath each database admin directory storing alert, trace, and core dump files. However, starting in Oracle 11g and continuing so in 12c, these directories appear in trace, alert, and incident subdirectories under the $ORACLE_BASE/diag/rdbms/database name directory. Here you see the location of key trace and alert files.

Directory Purpose
alert Location of the ever-important activity log file for your
database (XML Format).
cdump Location of core dump files.
trace Location of database or user-generated trace files reflecting
an error event. Replaces bdump and udump directories.
incident Location of additional trace files (Plain Text Format).

Oracle manages software installations based on their ORACLE_HOME directories. Multiple ORACLE_HOME directories can exist on a server, each corresponding to a different version of the database. Different versions can generally coexist without conflict as they only share the Oracle Inventory, oratab file, and database listener process. This separation of the software into different directories allows this separation and management to occur. Here’s an example of multiple ORACLE HOME directories:

$ ls -1 $ORACLE_BASE/product

In the preceding example, you see multiple ORACLE_HOME directories installed into different directories. Defining your environment variable settings to point to a specific ORACLE_HOME determines which one you’re using.

Database files (data, index, control, redo) are preferably stored in separate file systems allocated specifically for this purpose and separated by database names:


The oracle user in group dba needs to be able to read, write, and execute to the ORACLE_BASE and ORACLE_HOME directories, subdirectories, and files, as well as the database files themselves. If other users on this server need to execute programs on the server side, such as SQL*Plus or export/import or SQL*Loader, they need execute permissions on corresponding executables and, in some cases, libraries.