Linux平台安装Oracle 11.2.0.4.4 GI PSU补丁程序

这几天给客户装了一套基于 RedHat Linux 6.5 的Oracle 11.2.0.4 版本的 2个节点的RAC环境,软件装完了,数据库也建了,在安装补丁的时候却遇到了很头疼的问题,默认Oracle建议采用 opatch auto 方式来安装,但是尝试多次,均是HANG着不动,实在没辙,通过参考文档:Oracle Grid Infrastructure 11.2.0.4.x Patch Set Update SUPPLEMENTAL README (文档 ID 1641136.1) 完成。


下面的内容为本次手动安装补丁的全部操作步骤:


节点1:infodbdb1
节点2:infodbdb2
补丁存放目录(方便起见,两个节点存储在相同的目录):
[root@infodbdb2 psu]# ls -l
total 585852
drwxr-xr-x 5 grid   oinstall      4096 Oct 11 10:04 19380115


OPatch更新:$GRID_HOME和$ORACLE_HOME下的opatch程序均要替换为最新版的opatch(MOS上下载补丁:p6880880_112000_Linux-x86-64.zip)


手动安装GI PSU步骤:
1、关闭数据库
>>>关闭集群所有节点上运行的数据库实例。


2、以root身份执行per root脚本
[root@infodbdb1 ~]# /oracle/app/11.2.0/grid/crs/install/rootcrs.pl -unlock


3、以grid身份执行opatch,对CRS安装补丁
[root@infodbdb1 ~]# su - grid


$ /OPatch/opatch napply -oh -local //
[grid@infodbdb1 ~]$ /oracle/app/11.2.0/grid/OPatch/opatch napply -oh /oracle/app/11.2.0/grid -local /oracle/psu/19380115/19121549


$ /OPatch/opatch napply -oh -local //
[grid@infodbdb1 ~]$ /oracle/app/11.2.0/grid/OPatch/opatch napply -oh /oracle/app/11.2.0/grid -local /oracle/psu/19380115/19121552


$ /OPatch/opatch apply -oh -local //
[grid@infodbdb1 ~]$ /oracle/app/11.2.0/grid/OPatch/opatch apply -oh /oracle/app/11.2.0/grid -local /oracle/psu/19380115/19121551


4、以oracle身份执行DB组件的补丁脚本
$ ///custom/server//custom/scripts/prepatch.sh -dbhome
[root@infodbdb1 ~]# su - oracle
[oracle@infodbdb1 ~]$ /oracle/psu/19380115/19121549/custom/server/19121549/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME
/oracle/psu/19380115/19121549/custom/server/19121549/custom/scripts/prepatch.sh completed successfully.


5、以oracle身份执行 pre script for DB component
$ /OPatch/opatch napply -oh -local ///custom/server/
$ /OPatch/opatch apply -oh -local //


[oracle@infodbdb1 ~]$ $ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /oracle/psu/19380115/19121549/custom/server/19121549
[oracle@infodbdb1 ~]$ $ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /oracle/psu/19380115/19121551


6、以oracle身份执行 post script for DB component
$ ///custom/server//custom/scripts/postpatch.sh -dbhome
[oracle@infodbdb1 ~]$ /oracle/psu/19380115/19121549/custom/server/19121549/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME


7、以root身份执行 post script
[root@infodbdb1 ~]# $GRID_HOME/rdbms/install/rootadd_rdbms.sh
[root@infodbdb1 ~]# $GRID_HOME/crs/install/rootcrs.pl -patch


以上步骤在两个节点均成功执行后,然后在任意节点启动数据库:
[oracle@infodbdb1 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.4.0 Production on Fri Dec 19 18:52:07 2014
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> startup
ORACLE instance started.
Total System Global Area 8551575552 bytes
Fixed Size                  2270360 bytes
Variable Size            2835352424 bytes
Database Buffers         5704253440 bytes
Redo Buffers                9699328 bytes
Database mounted.
Database opened.


8、执行?/rdbms/admin/catbundle.sql脚本,更新数据字典
SQL>@?/rdbms/admin/catbundle.sql  psu apply
SQL> col comments for a30
SQL> select version,bundle_series,comments from dba_registry_history;


VERSION                        BUNDLE_SERIES                  COMMENTS
------------------------------ ------------------------------ ------------------------------
11.2.0.4                       PSU                            Patchset 11.2.0.2.0
11.2.0.4                       PSU                            PSU 11.2.0.4.4


至此,集群GI PSU补丁安装完成,数据库成功升级至最新的PSU版本号,即:11.2.0.4.4。


===============
其实中间还是遇到了点问题,就是执行完成补丁安装命令后,在启动数据库时,遇到如下错误:
[oracle@infodbdb1 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.4.0 Production on Fri Dec 19 18:47:16 2014
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 8551575552 bytes
Fixed Size                  2270360 bytes
Variable Size            2835352424 bytes
Database Buffers         5704253440 bytes
Redo Buffers                9699328 bytes
ORA-00205: error in identifying control file, check alert log for more info


此问题还是因为无法访问存储数据库数据文件的磁盘组所致,原因在于$ORACLE_HOME/bin/oracle文件的权限被修改了。
[oracle@infodbdb1 ~]$ ls -l /oracle/app/oracle/product/11.2.0/dbhome_1/bin/oracle
-rwxr-x--x 1 oracle oinstall 239768964 Dec 19 15:01 /oracle/app/oracle/product/11.2.0/dbhome_1/bin/oracle


修改:
[root@infodbdb1 ~]# chown oracle:asmadmin /oracle/app/oracle/product/11.2.0/dbhome_1/bin/oracle 
[root@infodbdb1 ~]# chmod 6751 /oracle/app/oracle/product/11.2.0/dbhome_1/bin/oracle 
[root@infodbdb1 ~]# ls -l /oracle/app/oracle/product/11.2.0/dbhome_1/bin/oracle 
-rwsr-s--x 1 oracle asmadmin 239768964 Dec 19 15:01 /oracle/app/oracle/product/11.2.0/dbhome_1/bin/oracle


再次启动数据库,正常。

你可能感兴趣的:(数据库)