The Optimal Flexible Architecture standard is a set of file naming and configuration guidelines created to ensure well organized Oracle installations that are easier to maintain.
You can think of Optimal Flexible Architecture as a set of good habits to adopt when organizing Oracle directories and files on your computer. All Oracle components on the installation media are Optimal Flexible Architecture-compliant; that is, Oracle Universal Installer places Oracle components in directory locations that follow Optimal Flexible Architecture guidelines. Although using Optimal Flexible Architecture is not a requirement, Oracle recommends that you use it if your database will grow in size, or if you plan to have multiple databases.
The goal of Optimal Flexible Architecture is to prevent an entire class of problems that can occur when you have different releases of Oracle software and multiple, growing databases on your computer.
Oracle Universal Installer separates Oracle software executables from database files. Previously, database files were placed in
\database, a subdirectory of the Oracle home directory that also contained Oracle software.
Using Optimal Flexible Architecture, Oracle Universal Installer puts Oracle software in
ORACLE_HOME and database files in
\oradata. When you upgrade a database to the latest release, the new Oracle software executables will be placed in a different Oracle home directory. After you judge the upgrade as successful, you can remove the old Oracle home directory and reclaim space, because the database does not reside there.
In Oracle Database 11g Release 1 (11.1), the Optimal Flexible Architecture recommended Oracle home path changed. The Optimal Flexible Architecture recommended path is now similar to the following:
ORACLE_BASE default does not contain version information but the default
In an Oracle8i release 8.1.3 or earlier release, all subdirectories are located under a top-level
ORACLE_HOME directory that by default is
When you install an Oracle Database 11g Release 1, Optimal Flexible Architecture-compliant database, all subdirectories are no longer under a top-level
ORACLE_HOME directory. There is now a new top-level Oracle base directory of the form
DRIVE_LETTER is any hard drive.
The Oracle base directory contains
\oradata directories (for database files),
\flash_recovery_area (for recovery operations), and
\admin directories (for database administration files).
In Oracle8i release 8.1.3 and earlier releases, database files have the SID in the database file name. For example, the first control file is named
Beginning with Oracle8i release 8.1.4, database files no longer have the SID in the database file name. For example, the first control file is named
control01.ctl. There is no need for the presence of the SID in the file name, because all the database files for a particular database are placed in
\oradata under a directory called
DB_NAME that is named for that database.
In Oracle8i release 8.1.3 and earlier releases, all database files have the same
In an Optimal Flexible Architecture-compliant release, the convention of having
.ora as the filename extension for database files is no longer used. Database filenames now have more meaningful extensions. These are:
.ctl for control files
.log for log files
.dbf for data files
Optimal Flexible Architecture uses directory naming conventions that make it easy to identify the precise Oracle home and database name that is associated with a set of files. This section describes the naming conventions used for top-level directories of an Optimal Flexible Architecture-compliant database directory tree:
ORACLE_BASE is the root of the Oracle directory tree. If you install an Optimal Flexible Architecture-compliant database using Oracle Universal Installer default settings, then
If you are installing Oracle Database for Microsoft Windows on a computer with no other Oracle software installed, then you can change the
ORACLE_BASE directory before running Oracle Universal Installer. Most users will not need or want to do this.
Do not change the value of
ORACLE_BASE after you run Oracle Universal Installer for the first time. If there is an existing
ORACLE_BASE and you change it, then there will be a conflict of Oracle base directories. If you create another
ORACLE_BASE when the original
ORACLE_BASE already exists, then certain tools and the database will not be able to find previously created files. They will look for them in the new
ORACLE_BASE instead of the original
See Also:Your operating system documentation for instructions about editing environment variables
ORACLE_HOME directory is located under
DRIVE_LETTER:\is any hard drive, and contains subdirectories for Oracle software executables and network files.
If you install Oracle Database for Windows on a computer with no other Oracle software installed and you use default settings, then the first Oracle home name directory that you create is called
Database administration files are stored in subdirectories of
In Oracle Database 11g, Automatic Diagnostic Repository (ADR) directories replace the bdump, cdump, and udump directories for the database. The ADR diagnostic data will go into the
Names and brief descriptions of some of these subdirectories are:
\create --database creation files \exp --database export files \pfile --initialization parameter files
Database files are stored in
DB_NAME. Names and brief descriptions of these files are:
CONTROL01.CTL --control file 1 CONTROL02.CTL --control file 2 CONTROL02.CTL --control file 3 EXAMPLE01.DBF --EXAMPLE tablespace data files SYSAUX01.DBF --SYSAUX tablespace data files SYSTEM01.DBF --SYSTEM tablespace data file TEMP01.DBF --TEMP tablespace data file USERS01.DBF --USERS tablespace data file *.dbf --data files corresponding to each tablespace in your database REDO01.LOG --redo log file group one, member one REDO02.LOG --redo log file group two, member one REDO03.LOG --redo log file group three, member one
Note:This directory structure allows for disk striping only on UNIX platforms. See "Support for Symbolic Links on Windows".
flash_recovery_area directory stores and manages files related to backup and recovery. It contains a subdirectory for each database on the system. A flash recovery area is an optional disk location that you can use to store recovery-related files such as control files and online redo log copies, archived logs, flashback logs, and Oracle Database Recovery Manager (RMAN) backups. Oracle and RMAN manage the files in the flash recovery area automatically.
See Also:Oracle Database Backup and Recovery User's Guide to learn how to create and use a flash recovery area
The following sections describe various Optimal Flexible Architecture and multiple Oracle homes configurations.
DRIVE_LETTER:\ is any hard drive. For example,
username is the
ORACLE_BASE before performing the installation.
db_1 is the name of the Oracle home.
The following are examples of Optimal Flexible Architecture-compliant Oracle home directories:
Install any Oracle Database that supports Optimal Flexible Architecture (Oracle Database release 8.1.6 or later) on a computer with no other Oracle software installed and make sure that you accept the default settings for the Oracle home (for example,
Install any Oracle Database in a second Oracle home accepting the default settings.
Table B-1 shows the default Optimal Flexible Architecture database settings.
In this example, you install each Oracle home into its own directory, but they all share the same Oracle base.
Install any Oracle Database that supports Optimal Flexible Architecture (Oracle Database 8.1.6 or later) on a computer with no other Oracle software installed and change the default Oracle Universal Installer settings for the first Oracle home (for example, from
Install any Oracle Database and change the default Oracle Universal Installer settings for the second Oracle home (for example, from
Table B-2 shows the nondefault Optimal Flexible Architecture database settings for this example.
(same for both Oracle homes)
Oracle home 1
Oracle home 2
The resulting directory tree would look similar to this:
X:\pqr --Oracle home 2 \bin \network X:\xyz \oracle --ORACLE_BASE for both Oracle homes \abc --Oracle home 1 \bin \network \admin \DB_NAME1 \adhoc \create \exp \pfile \DB_NAME2 \... \oradata \DB_NAME1 CONTROL01.CTL CONTROL02.CTL CONTROL03.CTL EXAMPLE01.DBF SYSAUX01.DBF SYSTEM01.DBF TEMP01.DBF USERS01.DBF REDO01.LOG REDO02.LOG REDO03.LOG \DB_NAME2
You implement Optimal Flexible Architecture on Windows and UNIX in the same way. However, differences exist with regard to the following:
See Also:Your UNIX operating system-specific administrator's reference for information about Optimal Flexible Architecture on UNIX
Top-level names of the Optimal Flexible Architecture directory tree differ between Windows and UNIX. However, main subdirectory names and file names are the same on both operating systems.
ORACLE_BASE is associated with a UNIX user's environment.
The goal of Optimal Flexible Architecture is to place all Oracle software under one
ORACLE_BASE directory and to spread files across different physical drives as your databases increase in size.
On UNIX, although everything seems to be in one directory on the same hard drive, files can be on different hard drives if they are symbolically linked or have that directory as a mount point.
Windows currently does not support symbolic links, so data files will not show up under a single directory as with UNIX. Instead, you may have
oradata directories on multiple drives, with data files in each one. This way, you get Optimal Flexible Architecture benefits, even though data files are not all visible in a single directory.
Oracle recommends that you use one logical drive to store your database administration files and that you place other files, as needed, on other logical drives in an
In the following example, there are four logical drives for a database named
c:\ contains an Oracle home and database administration files.
f:\ contains redo log files.
The F:\ drive could also represent two physical drives that have been striped to increase performance.
g:\ contains one of the control files and all tablespace files. The
G:\ drive could also use a RAID Level-5 configuration to increase reliability.
h:\ contains the second control file.
The directory structure would look similar to this:
c:\app\username\product\11.1.0 --First logical drive \db_1 --Oracle home \bin --Subtree for Oracle binaries \network --Subtree for Oracle Net \... \admin --Subtree for database administration files \prod --Subtree for prod database administration files \adhoc --Ad hoc SQL scripts \adump --Audit files \create --Database creation files \exp --Database export files \pfile --Initialization parameter file f:\app\username\product\11.1.0 --Second logical drive (two physical drives, striped) \oradata --Subtree for Oracle Database files \prod --Subtree for prod database files redo01.log --Redo log file group one, member one redo02.log --Redo log file group two, member one redo03.log --Redo log file group three, member one g:\app\username\product\11.1.0 --Third logical drive (RAID level 5 configuration) \oradata --Subtree for Oracle Database files \prod --Subtree for prod database files CONTROL01.CTL --Control file 1 EXAMPLE01.DBF --EXAMPLE tablespace data files SYSAUX01.DBF --SYSAUX tablespace data files SYSTEM01.DBF --System tablespace data file TEMP01.DBF --Temporary tablespace data file USERS01.DBF --Users tablespace data file h:\app\username\product\11.1.0 --Fourth logical drive \oradata --Subtree for Oracle Database files \prod --Subtree for prod database files CONTROL02.CTL --Control file 2