Oracle Directory Structure

Oracle has published a standard called the Optimal Flexible Architecture (OFA), which describes an ideal directory structure for Oracle software and database files. While the OFA was defined primarily for Unix environments (as it has many specific advantages for the Unix environment), the principles of OFA can be applied to most operating system environments.

OFA provides a very precisely defined structure, including directory names. In many installations it may be necessary and even desirable to make modifications to the OFA standard, and we do so in this book. However, even when modified, the key to OFA is a standard directory structure. On a Unix machine with five disk drives, hosting two databases (DB1 and DB2) running two versions of Oracle (7.3.4 and 8.0.5), the structure might look like this:

/disk00/oracle/product/7.3.4/...
/disk00/oracle/product/8.0.5/...
/disk01/oracle/oradata/DB1/...
/disk02/oracle/oradata/DB1/...
/disk03/oracle/oradata/DB2/...
/disk04/oracle/oradata/DB2/...

The key elements of this structure are:

  • Each mount point (disk) has the same name and is numbered sequentially (disk00 is the first disk, disk01 is the second, etc.).

  • Below each mount point is a directory called oracle . All Oracle files will be created below this point. On the disk that contains the Oracle software, the directory to this point ( /disk00/oracle, in our example) is called ORACLE_BASE.

  • The next level can contain the software directory (named the product directory according to the OFA standard), which in turn contains a directory for each Oracle version installed. This directory normally exists only on a single disk, and the directory to this level (/disk00/oracle/product/7.3.4 or /disk00/oracle/product/8.0.5 in our example) is called ORACLE_HOME . All Oracle software is organized in predefined directories below ORACLE_HOME, and on most platforms, ORACLE_HOME must be defined at the operating system level. Only the account that actually runs Oracle should have permission to access these directories.

  • At the same level as the product directory, each disk or mount point will have an oradata directory. A separate directory for each database (usually given the same name as the database) is then created below oradata. All Oracle datafiles are created here. The OFA standard requires that a given disk drive must contain only files for a single database (i.e., datafiles for DB2 cannot reside on the same disk as datafiles for DB1), but in practice, this is probably not reasonable, and you may want to relax this part of the OFA standard at your site. Files in these directories should be protected so that only the account that actually runs Oracle has permission to alter them.

Before beginning the installation of Oracle software, you should create at least the directory structure for ORACLE_HOME. The remainder of the structure should be created prior to attempting to create a database.

Tip

The Oracle White Paper “Optimal Flexible Architecture,” by Cary Millsap, provides a complete definition of the OFA standard and is available on Oracle’s web site (http://www.oracle.com).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset