Optimal Flexible Architecture
完全实现OFA至少需要三个文件系统位于不同的物理设备上,这些物理设备本身没有做条带或镜像。如果这些物理设备要做冗余与吞吐,建议使用一些存储相关的概念与东西,例如:lvm,raid,asm之类的存储技术手段来保障。
OFA帮助识别oracle_base及其ADR诊断数据
ORACLE_BASE /u01/app/oracle 有下面内容的就是ORACLE_BASE目录
[root@oracle3A oracle3A]# ls admin cfgtoollogs checkpoints diag flash_recovery_area oradata product
Automatic Diagnostic Repository 就是上面的diag目录
OFA 推荐的命名策略:包括5部分
1.文件系统 挂载点数量与命名 /pm 即/u01,/u02,/u03或/disk01,/disk02,/disk03之类
2.数据库目录命名
3.数据库文件命名
4.根据不同的需求分段
5.为oracle文件开发OFA结构
以下是目录命名,包括4部分:base,vldb,home,子目录
1.oracle base /pm/s/u 例如:/u01/app/oracle,/u01/app/applmgr
[root@oracle3A oracle3A]# ls admin cfgtoollogs checkpoints diag flash_recovery_area oradata product [root@oracle3A oracle3A]# pwd /oracle3A
其中admin是管理文件目录
oradata是数据文件目录
product是home目录
diag是adr目录
2.VLDB /h/q/d 例如:对test库分配两个专用盘的挂载点,/u01/app/oracle/oradata/test和/u02/app/oracle/oradata/test
3.oracle home /pm/s/u/product/v/type_[n] 例如:/u01/app/oracle/product/11.2.0/dbhome_1
4.子目录
/h/admin/d/a 数据库管理文件子目录 例如:10g [root@flt flt]# ls adump bdump cdump dpdump pfile udump [root@flt flt]# pwd /oracle/admin/flt 例如:11g [root@oracle3A flt]# ls adump dpdump pfile scripts [root@oracle3A flt]# pwd /oracle3A/admin/flt 在11g中,ADR目录替换了bdump,cdump,udump /h/diag/rdbms/d/i/ ADR目录
[root@oracle3A flt]# pwd
/oracle3A/diag/rdbms/flt/flt
[root@oracle3A flt]# ls
alert cdump hm incident incpkg ir lck metadata stage sweep trace
以下是数据库文件命名
Control files /h/q/d/control.ctl Redo log files /h/q/d/redon.log Data files /h/q/d/tn.dbf
例如:
[root@localhost orcl]# pwd
/u01/app/oracle/oradata/orcl
[root@localhost orcl]# ll
total 1513460
-rw-r-----. 1 oracle oinstall 9748480 Jul 10 11:56 control01.ctl
-rw-r-----. 1 oracle oinstall 52429312 Jul 10 11:56 redo01.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 10 02:00 redo02.log
-rw-r-----. 1 oracle oinstall 52429312 Jul 10 10:01 redo03.log
-rw-r-----. 1 oracle oinstall 566239232 Jul 10 11:55 sysaux01.dbf
-rw-r-----. 1 oracle oinstall 713039872 Jul 10 11:52 system01.dbf
-rw-r-----. 1 oracle oinstall 30416896 Jul 10 11:53 temp01.dbf
-rw-r-----. 1 oracle oinstall 94380032 Jul 10 11:53 undotbs01.dbf
-rw-r-----. 1 oracle oinstall 5251072 Jul 10 10:06 users01.dbf
参数文件位置
[root@localhost ~]# cd /u01/app/oracle/product/11.2.0/dbhome_1/dbs/
[root@localhost dbs]# ls
hc_orcl.dat init.ora lkORCL orapworcl spfileorcl.ora
OMF oracle-managed files 即oracle_base/oradata
oraInventory目录
在安装oracle软件或者使用dbca创建数据库时,所有的日志都会放在oraInventory这个目录下。 默认情况下该目录会在$ORACLE_BASE/oraInventory下,但是我们也可以通过更改/etc/oraInst.loc文件来指定具体的路径: 在linux下: 该文件路径为/etc/oraInst.loc 在hpunix下: 该文件路径为 /var/opt/oracle/oraInst.loc You all might be familiar with oraInventory & its importance so lets take a look at few common things about it like binary/xml inventory, What to do if Inventory is corrupted , What is global / Local Inventory and where to find documentation related to oraInventory . What is oraInventory ? oraInventory is repository (directory) which store/records oracle software products & their oracle_homes location on a machine. This Inventory now a days in XML format and called as XML Inventory where as in past it used to be in binary format & called as binary Inventory. There are basically two kind of Inventory Global Inventory (also called as Central Inventory) and Local Inventory also called as Oracle Home Inventory. Global Inventory ? Global Inventory holds information about Oracle Products on a Machine. These products can be various oracle components like database, oracle application server, collaboration suite, soa suite, forms & reports or discoverer server. This global Inventory location will be determined by file oraInst.loc in /etc (on Linux) or /var/opt/oracle (solaris). If you want to see list of oracle products on machine check for file inventory.xml under ContentsXML in oraInventory. Please note if you have multiple global Inventory on machine check all oraInventory directories) You will see entry like HOME NAME=”ORA10g_HOME” LOC=”/u01/oracle/10.2.0/db” TYPE=”O” IDX=”1″/ … … Local Inventory Inventory inside each Oracle Home is called as local Inventory or oracle_home Inventory. This Inventory holds information to that oracle_home only. Can I have multiple Global Inventory on a machine ? Quite common questions is that can you have multiple global Inventory and answer is YES you can have multiple global Inventory but if your upgrading or applying patch then change Inventory Pointer oraInst.loc to respective location. If you are following single global Inventory and if you wish to uninstall any software then remove it from Global Inventory as well. What to do if my Global Inventory is corrupted ? No need to worry if your global Inventory is corrupted, you can recreate global Inventory on machine using Universal Installer and attach already Installed oracle home by option -attachHome ./runInstaller -silent -attachHome -invPtrLoc $location_to_oraInst.loc ORACLE_HOME=”Oracle_Home_Location” ORACLE_HOME_NAME=”Oracle_Home_Name” CLUSTER_NODES=”{}” Do I need to worry about oraInventory during oracle Apps 11i cloning ? No, Rapid Clone will update both Global & Local Inventory with required information , you don’t have to worry about Inventory during Oracle Apps 11i cloning.