Oracle OFA(Optimal Flexible Architecture) 说明

官网链接如下:

http://docs.oracle.com/cd/E11882_01/install.112/e24321/appendix_ofa.htm#i633068

一.Overview of the Optimal Flexible Architecture Standard

The Optimal Flexible Architecture standard helps you to organize database software andconfigure databases to allow multiple databases, of different versions, ownedby different users to coexist. Optimal Flexible Architecture assists inidentification ofORACLE_BASEwith its Automatic DiagnosticRepository (ADR) diagnostic data to properly collect incidents.

--OFA 架构帮助我们组织Oracle 软件,配置数据库,通过OFA架构,我们可以安装多个数据库,这些数据库可以使用不同的版本,不同的用户。

All Oraclecomponents on the installation media are compliant with Optimal FlexibleArchitecture. Oracle Universal Installer places Oracle Database components indirectory locations, assigning the default permissions that follow OptimalFlexible Architecture guidelines.

--所有的Oracle 组件和安装介质都遵守OFA 架构。 OUI将oracle 组件存放到指定的目录,并根据OFA来分配默认的权限。

Oraclerecommends that you use Optimal Flexible Architecture, especially if thedatabase is huge, or if you plan to have multiple databases.

--Oracle 推荐我们使用OFA,除非我们的数据库非常大,或者我们计划使用多个数据库。

Advantages of Multiple Oracle Homesand OFA

When you installOracle database, you are installing a large application that your computer cansupport. Using multiple Oracle homes and Optimal Flexible Architecture providesmany advantages when administering large databases. The following advantagesare important:

--当数据库很大时,使用多个ORACLE Home 和 OFA有如下好处:

(1)Structured organization ofdirectories and files, and consistent naming for database files simplifydatabase administration.

(2)Distribution of I/O across multipledisks prevents performance bottlenecks caused by multiple read or writecommands issued simultaneously to a single drive.

(3)Distribution of applications acrossmultiple disks safeguards against database failures.

(4)Login home directories are not atrisk when database administrators add, move, or delete Oracle home directories.

(5)Multiple databases, of differentversions, owned by different users can coexist concurrently.

(6)Software upgrades can be tested inan Oracle home in a separate directory from the Oracle home where yourproduction database is located.

二.Implementing Optimal Flexible Architecture

2.1File Systems

The following sections describe theconventions for mount points:

Numberof File Systems

NamingConventions

2.1.1Number of FileSystems

To fullyimplement the Optimal Flexible Architecture recommendations for a databasestored on file systems that are not striped or mirrored, you require at leastthree file systems located on separate physical devices.

--为了完全实现OFA架构,Oracle建议将数据库存储在没有做strip 和 mirror的文件系统上,并且需要3个独立的物理设备。

2.1.2NamingConventions

Name all filesystem mount points using the syntax/pm, wherepis a stringconstant andmis a unique fixed-length key (typically a two-digitnumber) used to distinguish each mount point. Forexample:/u01and/u02, or/disk01and/disk02.

--文件系统的名字需要挂载到/pm 目录下,这里的p代表一个字符串常量,m 代表一个定长的值,这个值通常由2个数字组成。 如:/u01,u02 或者 /disk01,/disk02.

2.2Naming Directories(OFA的命名目录)

The followingsections describe the naming conventions for directories that are compliantwith the Optimal Flexible Architecture standard:

(1)OracleBase Directory Naming Convention

(2)NamingMount Points for Very Large Databases (VLDBs)

(3)Referringto Path Names

(4)OracleHome Directory Naming Convention

(5)NamingSubdirectories

Note:

Ensure that thepaths you select for Oracle software, such as the Oracle home path and theOracle base path, use only ASCII characters. Because installation owner namesare used by default for some paths, this ASCII character restriction applies touser names, file names, and directory names.

2.2.1Oracle Base Directory NamingConvention

--Oracle Base 目录的命名约定

The Oracle Basedirectory is the top level directory that you can use to install the variousOracle software products. You can use the same Oracle base directory formultiple installations. If different operating system users install Oraclesoftware on the same system, then each user must create a separate Oracle basedirectory.

--Oracle Base 目录是最顶层的目录,我们可以在这个目录下安装多套Oracle。 不同的数据库可以使用相同的ORACLE BASE 目录。 如果在同一个操作系统下用不同的OS用户来安装Oracle,那么每个OS 用户必须创建独立的ORACLE BASE 目录。

Name Oracle basedirectories using the syntax/pm/s/u.TableD-1describes the variables used in this syntax.

ORACLE base 目录使用如下格式:/pm/s/u. 具体每个参数的含义参考下表:

Table D-1 Syntax for Naming Oracle BaseDirectories

Variable

Description

pm

A mount point name

s

A standard directory name

u

The name of the owner of the directory (the user running Oracle Universal Installer)

For example,/u01/app/oracleis an Oracle base directory created bytheoracleuser and/u01/app/applmgris an Oracle basedirectory created by theapplmgruser.

Placing Oraclebase directories at the same level in the UNIX file system is advantageousbecause it enables you to refer to the collection of Oracle base directories ondifferent mount points using a single pattern matching string,/*/app/*.

2.2.2Naming Mount Points for VeryLarge Databases (VLDBs)

If each diskdrive contains database files from one application and there are enough drivesfor each database to prevent I/O bottlenecks, use thesyntax/h/q/dfor naming mount points.TableD-2describes the variables used in this syntax.

--如果每个磁盘存放一个应用,从而来降低磁盘I/O的瓶颈,那么使用/h/q/d 的格式来挂载。 具体参数含义参考下表:

Table D-2 Syntax for Naming Mount Pointsfor Very Large Databases

Variable

Description

h

Oracle base directory

q

A string denoting that Oracle data is stored in this directory, for example,oradata

d

The value of the initialization parameterDB_NAME(typically the same as the instanceSIDfor single-instance databases)

For example, toallocate two drives exclusively for thetestdatabase, name the mountpoints/u01/app/oracle/oradata/testand/u02/app/oracle/oradata/test.

2.2.3Referring to Path Names

Refer toexplicit path names only in files designed specifically to store them, such asthe password file,/etc/passwd,and the Oracleoratabfile. Refer to group memberships only inthe/etc/groupfile.


2.2.4Oracle Home Directory NamingConvention

--Oracle Home 目录的命名约定

To help fulfillthe Optimal Flexible Architecture requirement of simultaneously runningmultiple versions of Oracle software, install the software in a directorymatching the pattern/pm/s/u/product/v/type_[n].

--为了保证多个版本的数据库同时运行,OFA的目录需要按照如下格式:/pm/s/u/product/v/type_[n]. 具体含义参考下表:

TableD-3 Syntax for Naming Oracle Home Directories

Variable

Description

pm

A mount point name

s

A standard directory name

u

The name of the owner of the directory

v

The version of the software

type

The type of installation, for example Database (dbhome_1), Client (client), or Oracle Grid Infrastructure (grid)

n

An optional counter, which enables you to install the same product more than once in the same Oracle base directory

For example:

/u01/app/oracle/product/11.2.0/dbhome_1indicatesthe Oracle home directory for the first installation of Oracle Database on thissystem.

TheORACLE_HOMEenvironmentvariable is set to the Oracle home directory.

2.2.5Naming Subdirectories

To facilitatethe organization of administrative data, Oracle recommends that you storedatabase-specific administration files in subdirectories matching thepattern/h/admin/d/a/, wherehis the Oracle basedirectory,dis the database name (DB_NAME), andais asubdirectory for specific types of database administration files.TableD-4describes the database administration file subdirectories.

--oracle 推荐的子目录使用如下格式:/h/admin/d/a, 这里h 是OracleBase,d 代表实例名,a 代表不同的类型,a 代表的具体含义参考下表:

TableD-4 Subdirectories for Database Administration Files

Subdirectory

Description

arch

Archived redo log files

adump

Audit files (Set theAUDIT_FILE_DESTinitialization parameter to specify theadumpdirectory. Clean out this subdirectory periodically

create

Contains the data pump filedp.log

dpdump

Default directory for data pump operations. Scripts used to create the database

exp

Database export files

logbook

Files recording the status and history of the database

pfile

Instance parameter files

scripts

Ad hoc SQL scripts

For example,/u01/app/oracle/admin/orcl/scripts/isthescriptssubdirectory associated with the database namedorcl.

In Oracle Database11g, Automatic Diagnostic Repository (ADR) directories replace thebdump,cdump,andudumpdirectories.The ADR diagnostic data goes into the/h/diag/rdbms/d/i/directory.

where

his Oracle Base

dis the database name

iis the instance name.

这里要注意的是,在Oracle 11g里面Oracle 使用ADR 目录代替了bdump,cdump和udump。ADR的目录结构是/h/diag/rdbms/d/i.

The ADR home hasthe trace, alert, and incident sub-directories.TableD-5describes the ADR directories.

ADR 目录有trace,alert 和其他的子目录,这些子目录如下表:

TableD-5 Locations for Diagnostic Traces

Diagnostic Data

10gLocation

11gLocation

Foreground Process traces

user_dump_dest

ADR_HOME/trace/

Background Process traces

background_dump_dest

ADR_HOME/trace/

Alert Log Data

background_dump_dest

ADR_HOME/alert/

Core Dump

core_dump_dest

ADR_HOME/incident/In/

Incident Dumps

user_dump_destorbackground_dump_destdepending on the process

ADR_HOME/incident/In/

2.3Naming Database Files

--数据文件命名

The followingtable lists the recommended file naming conventions for database files:

--oracle推荐的命名约定如下表:

Note:

Oracle Managed Files (OMF) and files storedinOracle Automatic StorageManagement disk groups use different naming conventions.

--这里除了OMF,其文件存在放ASM里,有自己的命名约定。

File Type

File Naming Convention

Control files

/h/q/d/control.ctl

Redo log files

/h/q/d/redon.log

Data files

/h/q/d/tn.dbf

The following table describes this syntax:

--上面参数的具体解释:

Variable

Description

h

Oracle base directory

q

A string (typicallyoradata) distinguishing Oracle data from all other files

d

The value of theDB_NAMEinitialization parameter (typically, the same as the instanceSIDfor single-instance databases)

t

An Oracle tablespace name

n

A two-digit string

Note:

Do not storefiles other than control files, redo log files, or data files associated withdatabasedin the path/h/q/d.

--主要不要在/h/q/d 目录下存储除控制文件,online redo 和datafile 之外的文件。

Using thisconvention, it is easy to determine the database to which the/u01/app/oracle/oradata/sab/system01.dbffilebelongs.

--使用这种命名约定,可以很容易的辨别文件属于那个实例。

2.4Separating Segments withDifferent Requirements

Separate groupsof segments with different lifespans, I/O request demands, and backupfrequencies across different tablespaces.

TableD-6describes the special tablespaces that the Database ConfigurationAssistant creates for each Oracle database. If you manually create a database,you must create the required tablespaces. These tablespaces are in addition tothose required for application segments.

根据不同的需求来创建对应的表空间,下表列出的是DBCA命令创建的所有表空间,其中的Example 和users 是可选的的表空间。

TableD-6 Special Tablespaces

Tablespace

Required

Description

EXAMPLE

No

TheEXAMPLEtablespace used to store the Sample Schemas

SYSAUX

Yes

Auxiliary tablespace to theSYSTEMtablespace

SYSTEM

Yes

Data dictionary segments

TEMP

Yes

Temporary segments

UNDOTBS1

Yes

Used by Oracle to store undo information

USERS

No

Miscellaneous user segments

这里的USERS表空间是我们的默认表空间,关于默认表空间参考:

Oracle 默认表空间(default permanenttablespace) 说明

http://blog.csdn.net/tianlesoftware/article/details/7084700

Creating thesespecial tablespaces is effective because data dictionary segments are neverdropped, and no other segments that can be dropped are allowed in theSYSTEMtablespace.

2.5Exploiting the Optimal FlexibleArchitecture Structure for Oracle Files

TableD-7describes the syntax used for identifying classes of files.

TableD-7 Directory Structure Syntax for Identifying Classes of Files

Directory Structure Syntax

Description

/u[0-9][0-9]

User data directories

/*/home/*

User home directories

/*/app/*

User application software directories

/*/app/applmgr

Oracle applications software subtrees

/*/app/oracle/product

Oracle software subtrees

/*/app/oracle/product/11.2.0

Oracle software subtree for release 11gproducts

/*/app/oracle/product/11.2.0/db*

Oracle home directories for Oracle Database 11g

/*/app/oracle/product/11.2.0/grid*

Oracle home directory for Oracle Grid Infrastructure 11gfor a standalone server, for useroracle

/*/app/oracle/admin/orcl

orcldatabase administrative subtrees

/*/app/oracle/admin/orcl/arch/*

orcldatabase archived log files

/*/app/oracle/oradata

Oracle data directories

/*/app/oracle/oradata/orcl/*

orcldatabase files

/*/app/oracle/oradata/orcl/*.log

orcldatabase redo log files

2.6Optimal Flexible ArchitectureFile Mapping

TableD-8shows a hierarchical file mapping of a sample Optimal FlexibleArchitecture-compliant installation with two Oracle home directories and twodatabases. The database files are distributed across three mount points,/u02,/u03,and/u04.

Note:

Oracle recommends that you use Oracle ASM to provide greater redundancy andthroughput.

TableD-8 Hierarchical File Mapping for an Optimal Flexible Architecture Installation

Directory

Description

/

Root directory

/u01/

User data mount point 1

/u01/app/

Subtree for application software

/u01/app/oracle/

Oracle Base directory

/u01/app/oracle/admin/

Subtree for database administration files

/u01/app/oracle/admin/TAR

Subtree for support log files

/u01/app/oracle/admin/db_name1/

adminsubtree fordb_name1database

/u01/app/oracle/admin/db_name2/

adminsubtree fordb_name2database

/u01/app/oracle/doc/

Online documentation

/u01/app/oracle/fast_recovery_area/

Subtree for recovery files

/u01/app/oracle/fast_recovery_area/db_name1

Recovery files fordb_name1database

/u01/app/oracle/fast_recovery_area/db_name2

Recovery files fordb_name2database

/u02/app/oracle/oradata

/u03/app/oracle/oradata

/u04/app/oracle/oradata

Oracle data directory

/u01/app/oracle/product/

Distribution files

/u01/app/oracle/product/11.2.0/dbhome_1

Oracle home directory for Oracle Database, for useroracle

/u01/app/oracle/product/11.2.0/grid

Oracle home directory for Oracle Grid Infrastructure for a standalone server, for useroracle

/u01/app/kjf/

Oracle base directory for userkjf

/u01/app/edm/

Oracle base directory for useredm

-------------------------------------------------------------------------------------------------------

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

Email: [email protected]
Skype: tianlesoftware
Blog: http://www.tianlesoftware.com
Weibo: http://weibo.com/tianlesoftware
Twitter: http://twitter.com/tianlesoftware
Facebook: http://www.facebook.com/tianlesoftware

-------加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请----

DBA1 群:62697716(满); DBA2 群:62697977(满)DBA3 群:62697850(满)

DBA 超级群:63306533(满); DBA4 群:83829929 DBA5群: 142216823

DBA6 群:158654907 DBA7 群:172855474

你可能感兴趣的:(Architecture)