Oracle OFA:Optimal Flexible Architecture Simplified
A good friend of mine once approached me asking if I could summarize Oracle OFA (Optimal Flexible Architecture). He said there is a ton of documentation on-line but nothing that he could read in few minutes. Later that night I wrote him an email and now I modified that email to publish here. What you find below is not a complete OFA, it’s just a summary of OFA tidbits in my head. The flow and convention are heavily influenced by a 2 great DBA companion books Expert Oracle Database 10g Administration (Expert’s Voice) and Expert Oracle Database 11g Administration (Expert’s Voice in Oracle)
Mount Points:
Naming Convention /pm
Where: p= string constant
m=two digit number
Examples: /u01, /u02, /u03 etc
Mount point names must be simple and should not include and hardware specific information. This helps with changing disk system when needed.
At least 4 mount points to fully comply with OFA. 1 for oracle binaries and the remaining 3 are for oracle database files.
Directory and File Naming Conventions:
OS User Home directory should be: /pm/h/u
Where: h=Standard directory name (generally app)
u=directory owner
Example: /u01/app/oracle is the home directory of the oracle user
ORACLE_BASE: Root of the Oracle directory structure, Home of the Oracle installation owner. Generally /u01/app/oracle
Set this as an environment variable for clarity
ORACLE_HOME: All oracle binaries and library files are to be located under this directory.
Examples: $ORACLE_HOME/bin Container for Oracle binaries
$ORACLE_HOME/network Container for Oracle network services files
$ORACE_HOME = $ORACLE_BASE/product/v/type_[n]
Where: v= version of the software
type= type of installation db|client|companion
n=counter for multiple installation of the same product
Oracle Inventory Directory (OraInventory)
Conventional location is $ORACLE_BASE/oraInventory
Stores the inventory list of all oracle products installed on the box. This path is specified only during the installation of the first oracle product. Future installs will/can use this inventory directory.
Administrative Files
Configurations files, core dump files, trace files, export files and other related log files are the administrative files of an Oracle database. Each of the former mentioned group of files need to be stored in a different folder.
OFA recommended location: $ORACLE_BASE/admin/d/a
Where: d=refers to a specific database
a=subdirectory for each specific type of administrative files
Example: For a database orcl
|
Directory |
Contents |
| $ORACLE_BASE/admin/orcl/adhoc | Contains ad hoc sqlfiles |
| $ORACLE_BASE/admin/orcl/arch | Contains archived redo logs |
| $ORACLE_BASE/admin/orcl/adump | Contains any audit files |
| $ORACLE_BASE/admin/orcl/bdump | Contains background process trace files |
| $ORACLE_BASE/admin/orcl/cdump | Contains core dump files |
| $ORACLE_BASE/admin/orcl/udump | Contains SQL trace files for the user processes |
| $ORACLE_BASE/admin/orcl/dpdump | Cotains Data Pump export files |
| $ORACLE_BASE/admin/orcl/create | Contains SQL scripts that you can use for creating your databases |
| $ORACLE_BASE/admin/orcl/pfile | Contains instance parameter files (ex: init.ora) |
Database Files:
OFA Recommendation for Control Files : /pm/q/d/control[n].ctl
Where: q=indicator such as “oradata”, to indicate that the contents are Oracle related data
d=Database=DB_NAME (initialization parameter)
n=two digit number
OFA Recommendation for Redolog Files: /pm/q/d/redo[n].log
Where: q=indicator such as “oradata”, to indicate that the contents are Oracle related data
d=Database=DB_NAME (initialization parameter)
n=two digit number
OFA Recommendation for Data Files: /pm/q/d/t[n].dbf
Where: q= indicator such as “oradata”, to indicate that the contents are Oracle related data
d=Database=DB_NAME (initialization parameter)
Tablespace name should be of format t[n] and not more than eight character in length
t= Descriptive name of the tablespace
n=two digit number
Few things to bear in mind
Always place your database files over a logical volume that spreads over several disks or use RAID.
SAME: Stripe and mirror every thing
For all oracle mount points that you use to store data files, make sure to run:
Chown oracle:oinstall <mount point>
Chmod 755 <mount point>