安装PSU 11g RAC 11.2.0.3.0 到11.2.0.3.1

来源:互联网 发布:富士通南大软件怎么样 编辑:程序博客网 时间:2024/05/20 16:42


1、环境介绍:

两台主机,操作系统

[root@rac121 ~]# cat /proc/versionLinux version 2.6.18-164.el5 (mockbuild@x86-003.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Tue Aug 18 15:51:48 EDT 2009[root@rac121 ~]# [root@rac121 ~]# lsb_release -aLSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarchDistributor ID: RedHatEnterpriseServerDescription:    Red Hat Enterprise Linux Server release 5.4 (Tikanga)Release:        5.4Codename:       Tikanga

DB: Oracle 11gR2(11.2.0.3.0),RAC,ASM

service_name:racdb

sid :racdb1,racdb2

2、升级前数据库补丁情况

[root@rac121 ~]# su - oracle[oracle@rac121 ~]$ cd $ORACLE_HOME/OPatch/[oracle@rac121 OPatch]$ lsdocs  emdpatch.pl  fmw  jlib  ocm  opatch  opatch.bat  opatch.ini  opatch.pl  opatchprereqs[oracle@rac121 OPatch]$ ./opatch versionInvoking OPatch 11.2.0.1.7OPatch Version: 11.2.0.1.7OPatch succeeded.[oracle@rac121 OPatch]$ sqlplus /nologSQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 28 10:46:39 2012Copyright (c) 1982, 2011, Oracle.  All rights reserved.SQL> conn / as sysdbaConnected.SQL> col action format a15 SQL> col comments format a30SQL> select action,comments from registry$history;ACTION          COMMENTS--------------- ------------------------------APPLY           Patchset 11.2.0.2.0SQL> 

3、下载Patch Set:

根据metalink文档的信息,升级PSU到11.2.0.3.1需要下载Patch:13348650我的Patch 13348650 对应的操作系统的版本为:p13348650_112030_Linux-x86-64.zip

4、解压Patch:

[root@rac121 ~]# cd /data01[root@rac121 data01]# ll-rw-r--r-- 1 root   root      335597984 May 23 10:18 p13348650_112030_Linux-x86-64.zip[root@rac121 data01]# unzip p13348650_112030_Linux-x86-64.zip -d /data01/p13348650/[root@rac121 data01]# lldrwxr-xr-x 4 root   root           4096 Jun 28 11:05 p13348650-rw-r--r-- 1 root   root      335597984 May 23 10:18 p13348650_112030_Linux-x86-64.zip[root@rac121 data01]# cd p13348650[root@rac121 p13348650]# lltotal 128drwxr-xr-x 4 root root   4096 Jan 15 00:08 13343438drwxr-xr-x 5 root root   4096 Jan 15 00:08 13348650-rw-r--r-- 1 root root    422 Jan 15 00:08 bundle.xml-rw-rw-r-- 1 root root 107674 Jan 16 21:49 README.html-rw-r--r-- 1 root root     21 Jan 15 00:08 README.txt[root@rac121 p13348650]#

5、阅读README.html中有如下内容

2.1.1 OPatch Utility Information

You must use the OPatch utility version 11.2.0.1.8 or later to apply this patch. Oracle recommends that you use the latest released OPatch for 11.2 releases, which is available for download from My Oracle Support patch 6880880 by selecting ARU link for the 11.2.0.0.0 release. It is recommended that you download the Opatch utility and the patch in a shared location to be able to access them from any node in the cluster for the patch application on each node.

在安装前必须要大于等于11.2.0.1.8版本的OPatch,低于的话则要按照如下步骤将RAC所有节点的的database home 和 GI home 进行opatch,而且也告知了下载6880880的OPatch

即将opatch解压覆盖原来的OPatch目录。

Note:

When patching the GI Home, a shared location on ACFS only needs to be unmounted on the node where the GI Home is being patched.

The new opatch utility should be updated in all the Oracle RAC database homes and the GI home that are being patched. To update Opatch, use the following instructions.

  1. Download the OPatch utility to a temporary directory.

  2. For each Oracle RAC database home and the GI home that are being patched, run the following commands as the home owner to extract the OPatch utility.

    unzip <OPATCH-ZIP> -d <ORACLE_HOME><ORACLE_HOME>/OPatch/opatch version

The version output of the previous command should be 11.2.0.1.8 or later.


6、根下载OPatch

     如果步骤5检查通过,该步可省略

     据步骤2中检查出来的OPatch版本为11.2.0.1.7,比11.2.0.1.8早,所以应该先应用OPatch。到MOS上下载对应操作系统的OPatch 6880880,

     我的版本如下:p6880880_112000_Linux-x86-64.zip

     将p6880880_112000_Linux-x86-64.zip解压并覆盖各个节点databases home 和 GI home

[root@rac121 data01]# su - oracle[oracle@rac121 ~]$ cd /data01[oracle@rac121 data01]$ lsp6880880_112000_Linux-x86-64.zip[oracle@rac121 data01]$ unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME/Archive:  p6880880_112000_Linux-x86-64.zip   creating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/  inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/README.html    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/README.txt     creating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/  inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/oplan.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/oracle.oplan.classpath.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/automation.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/OsysModel.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/EMrepoDrivers.jar     creating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/apache-commons/  inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/apache-commons/commons-cli-1.0.jar     creating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/jaxb/  inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/jaxb/activation.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/jaxb/jaxb-api.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/jaxb/jaxb-impl.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/jaxb/jsr173_1.0_api.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/osysmodel-utils.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/jlib/CRSProductDriver.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/oplan/oplan  replace /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/docs/FAQ? [y]es, [n]o, [A]ll, [N]one, [r]ename: All  inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/docs/FAQ    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/docs/Users_Guide.txt    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/docs/Prereq_Users_Guide.txt    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/jlib/opatch.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/jlib/opatchsdk.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/jlib/oracle.opatch.classpath.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/jlib/oracle.opatch.classpath.unix.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/jlib/oracle.opatch.classpath.windows.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatchprereqs/opatch/opatch_prereq.xml    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatchprereqs/opatch/rulemap.xml    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatchprereqs/opatch/runtime_prereq.xml    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatchprereqs/oui/knowledgesrc.xml    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatchprereqs/prerequisite.properties    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatch    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatch.bat    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatch.pl    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatch.ini    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatchdiag    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatchdiag.bat    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/emdpatch.pl    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/README.txt     creating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/bin/  inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/bin/emocmrsp     creating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/doc/   creating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/  inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/emocmclnt-14.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/emocmclnt.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/emocmcommon.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/http_client.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/jcert.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/jnet.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/jsse.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/log4j-core.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/osdt_core3.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/osdt_jce.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/regexp.jar    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/lib/xmlparserv2.jar   extracting: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/ocm.zip    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/ocm/ocm_platforms.txt     creating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/   creating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/log/ extracting: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/log/dummy    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/auto_patch.pl    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/crsconfig_lib.pm    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/crsdelete.pm    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/crspatch.pm    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/installPatch.excl    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/oracss.pm    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/patch112.pl    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/s_crsconfig_defs    inflating: /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/s_crsconfig_lib.pm  [oracle@rac121 data01]$ cd $ORACLE_HOME/OPatch/[oracle@rac121 OPatch]$ lltotal 140drwxrwxr-x 3 oracle oinstall  4096 Mar 22 03:25 crsdrwxr-xr-x 2 oracle oinstall  4096 Jun 28 11:29 docs-rw-rw-r-- 1 oracle oinstall 23695 Mar 22 03:24 emdpatch.pldrwxr-xr-x 2 oracle oinstall  4096 Jun 18 16:16 fmwdrwxr-xr-x 2 oracle oinstall  4096 Jun 28 11:29 jlibdrwxr-xr-x 5 oracle oinstall  4096 Jun 28 11:29 ocm-rwx--x--- 1 oracle oinstall 31471 Mar 22 03:24 opatch-rwxrwxr-x 1 oracle oinstall 18425 Mar 22 03:24 opatch.bat-rwxrwxr-x 1 oracle oinstall 10056 Mar 22 03:24 opatchdiag-rwxrwxr-x 1 oracle oinstall  9352 Mar 22 03:24 opatchdiag.bat-rw-rw-r-- 1 oracle oinstall    49 Mar 22 03:24 opatch.ini-rw-rw-r-- 1 oracle oinstall  2576 Mar 22 03:24 opatch.pldrwxr-xr-x 4 oracle oinstall  4096 Jun 28 11:29 opatchprereqsdrwxrwxr-x 3 oracle oinstall  4096 Mar 22 03:25 oplan-rw-rw-r-- 1 oracle oinstall  2913 Mar 22 03:24 README.txt[oracle@rac121 OPatch]$ ./opatch versionOPatch Version: 11.2.0.3.0  --应用成功,版本号已经更新OPatch succeeded.[oracle@rac121 OPatch]$ --照上面步骤,Opatch到GI home 及另一个节点的database home 和 GI home

7、根据README.html中的安装前检查还要作OCM Configuration 检查:

2.1.2 OCM Configuration

The OPatch utility will prompt for your OCM (Oracle Configuration Manager) response file when it is run. You should enter a complete path of OCM response file if you already have created this in your environment.

If you do not have the OCM response file (ocm.rsp), then you should run the following command to create it.

As the Grid home owner execute:

%<ORACLE_HOME>/OPatch/ocm/bin/emocmrsp

You can also invoke opatch auto with the -ocmrf <OCM response file path> option to run opatch auto in silent mode.

所以还要以grid用户到两个节点的对应目录下去生成 OCM response file

[grid@rac121 OPatch]$ $ORACLE_HOME/OPatch/ocm/bin/emocmrsp
OCM Installation Response Generator 10.3.4.0.0 - Production
Copyright (c) 2005, 2010, Oracle and/or its affiliates.  All rights reserved.


Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name: ccboceb7@gmail.com
Provide your My Oracle Support password to receive security updates via your My Oracle Support account.
Password (optional):           
Invalid My Oracle Support credentials.


Email address/User Name: 


You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  No
Email address/User Name: 


You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Yes
The OCM configuration response file (ocm.rsp) was successfully created.
[grid@rac121 bin]$ ls -lsa
total 24
 4 drwxrwxr-x 2 grid oinstall 4096 Jun 28 11:54 .
 4 drwxr-xr-x 5 grid oinstall 4096 Jun 28 11:38 ..
12 -rwxrw---- 1 grid oinstall 9063 Nov 27  2009 emocmrsp
 4 -rw-r--r-- 1 grid oinstall  621 Jun 28 11:54 ocm.rsp
[grid@rac121 bin]$ mv ocm.rsp /home/grid --不用移动也行,访该目录也行,我这儿方便一会儿安装时简化目录输入


8、检查相关补丁冲突

      结合Patch13348650 README文档的介绍,检查步骤有以下几个:

      opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/13343438 –oh $GRID_HOME

      opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/13343438 –oh $DB_HOME

      opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/13348650 –oh $GRID_HOME

      opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>13348650/custom/server/13348650 –oh $DB_HOME

      检查过程如下:

[grid@rac121 data01]$ cd p13348650[grid@rac121 p13348650]$ ls13343438  13348650  bundle.xml  README.html  README.txt[grid@rac121 p13348650]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./13343438 -oh $ORACLE_HOMEOracle Interim Patch Installer version 11.2.0.3.0Copyright (c) 2012, Oracle Corporation.  All rights reserved.PREREQ sessionOracle Home       : /oradata/oracleapp/11.2.0/gridCentral Inventory : /u01/app/oraInventory   from           : /oradata/oracleapp/11.2.0/grid/oraInst.locOPatch version    : 11.2.0.3.0OUI version       : 11.2.0.3.0Log file location : /oradata/oracleapp/11.2.0/grid/cfgtoollogs/opatch/opatch2012-06-28_14-06-34PM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail" passed.OPatch succeeded.[grid@rac121 p13348650]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./13348650 -oh $ORACLE_HOMEOracle Interim Patch Installer version 11.2.0.3.0Copyright (c) 2012, Oracle Corporation.  All rights reserved.PREREQ sessionOracle Home       : /oradata/oracleapp/11.2.0/gridCentral Inventory : /u01/app/oraInventory   from           : /oradata/oracleapp/11.2.0/grid/oraInst.locOPatch version    : 11.2.0.3.0OUI version       : 11.2.0.3.0Log file location : /oradata/oracleapp/11.2.0/grid/cfgtoollogs/opatch/opatch2012-06-28_14-19-15PM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail" passed.OPatch succeeded.[grid@rac121 p13348650]$ su - oraclePassword: [oracle@rac121 ~]$ cd /data01/p13348650[oracle@rac121 p13348650]$ ls13343438  13348650  bundle.xml  README.html  README.txt[oracle@rac121 p13348650]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./13343438 -oh $ORACLE_HOMEOracle Interim Patch Installer version 11.2.0.3.0Copyright (c) 2012, Oracle Corporation.  All rights reserved.PREREQ sessionOracle Home       : /oradata/oracleapp/oracle/product/11.2.0/db1Central Inventory : /u01/app/oraInventory   from           : /oradata/oracleapp/oracle/product/11.2.0/db1/oraInst.locOPatch version    : 11.2.0.3.0OUI version       : 11.2.0.3.0Log file location : /oradata/oracleapp/oracle/product/11.2.0/db1/cfgtoollogs/opatch/opatch2012-06-28_14-22-56PM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail" passed.OPatch succeeded.[oracle@rac121 p13348650]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./13348650/custom/server/13348650 -oh $ORACLE_HOMEOracle Interim Patch Installer version 11.2.0.3.0Copyright (c) 2012, Oracle Corporation.  All rights reserved.PREREQ sessionOracle Home       : /oradata/oracleapp/oracle/product/11.2.0/db1Central Inventory : /u01/app/oraInventory   from           : /oradata/oracleapp/oracle/product/11.2.0/db1/oraInst.locOPatch version    : 11.2.0.3.0OUI version       : 11.2.0.3.0Log file location : /oradata/oracleapp/oracle/product/11.2.0/db1/cfgtoollogs/opatch/opatch2012-06-28_14-24-59PM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail" passed.OPatch succeeded.[oracle@rac121 p13348650]$ --到此补丁冲突检查都通过

9、 通过OPatch 工具自动安装PSU

       以下来自Patch13348650 README文档原文:

       The Opatch utility has automated the patch application for the Oracle Grid Infrastructure (GI) home and the Oracle RAC database homes. It operates by            querying existing configurations and automating the steps required for patching each Oracle RAC database home of same version and the GI home.

      The utility must be executed by an operating system (OS) user with root privileges (usually the user root), and it must be executed on each node in the           cluster if the GI home or Oracle RAC database home is in Non-shared storage. The utility should not be run in parallel on the cluster nodes.

      这儿注意一点要用root用户

     Depending on command line options specified, one invocation of Opatch can patch the GI home, one or more Oracle RAC database homes, or both GI and         Oracle RAC database homes of the same Oracle release version. You can also roll back the patch with the same selectivity.

      1、 To patch GI home and all Oracle RAC database homes of the same version:

       opatch auto <UNZIPPED_PATCH_LOCATION> -ocmrf <ocm response file>


      2、To patch only the GI home:

       #opatch auto <UNZIPPED_PATCH_LOCATION> -oh <GI_HOME> -ocmrf <ocm response file>

 

      3、To patch one or more Oracle RAC database homes:

      #opatch auto <UNZIPPED_PATCH_LOCATION> -oh <path to RAC database1 home>, <path of the RAC database1 home> -ocmrf <ocm response file>

 

       我这里的<UNZIPPED_PATCH_LOCATION> = /data01/p13348650

       针对上面的几种方式,我选择第1种进行安装:同时将GI 和 DB都安装 了,所以在两个节点分别执行 

                                                                                   如下操作即可。

     整个安装过程中,数据库、CRS会自动停止和启动,不需要人工干预

     9.1、安装

[root@rac121 p13348650]# su - root[root@rac121 /]# /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatch auto /data01/p13348650  -ocmrf /home/grid/ocm.rspExecuting /usr/bin/perl /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/patch112.pl -patchdir /data01 -patchn p13348650 -ocmrf /home/grid/ocm.rsp -paramfile /oradata/oracleapp/11.2.0/grid/crs/install/crsconfig_paramsopatch auto log file location is /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/../../cfgtoollogs/opatchauto2012-06-29_10-19-39.logDetected Oracle Clusterware installUsing configuration parameter file: /oradata/oracleapp/11.2.0/grid/crs/install/crsconfig_paramspatch /data01/p13348650/13348650/custom/server/13348650  apply successful for home  /oradata/oracleapp/oracle/product/11.2.0/db1patch /data01/p13348650/13343438  apply successful for home  /oradata/oracleapp/oracle/product/11.2.0/db1Successfully unlock /oradata/oracleapp/11.2.0/gridThe opatch Applicable check failed for /oradata/oracleapp/11.2.0/grid.  The patch is not applicable for /oradata/oracleapp/11.2.0/gridpatch /data01/p13348650/13348650  apply  failed  for home  /oradata/oracleapp/11.2.0/gridACFS-9300: ADVM/ACFS distribution files found.ACFS-9312: Existing ADVM/ACFS installation detected.ACFS-9314: Removing previous ADVM/ACFS installation.ACFS-9315: Previous ADVM/ACFS components successfully removed.ACFS-9307: Installing requested ADVM/ACFS software.ACFS-9308: Loading installed ADVM/ACFS drivers.ACFS-9321: Creating udev for ADVM/ACFS.ACFS-9323: Creating module dependencies - this may take some time.ACFS-9154: Loading 'oracleoks.ko' driver.ACFS-9154: Loading 'oracleadvm.ko' driver.ACFS-9154: Loading 'oracleacfs.ko' driver.ACFS-9327: Verifying ADVM/ACFS devices.ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'.ACFS-9156: Detecting control device '/dev/ofsctl'.ACFS-9309: ADVM/ACFS installation correctness verified.CRS-4123: Oracle High Availability Services has been started.[root@rac121 /]# 

          上面安装发现了问题,在patch GI 时失败,通过检查日志,发现读/data01/p13348650目录的文件不成功,不应该啊,这是root用户啊,而且DB patch成功,先不管了,由于这是在安装GI,所以将目录权限付给grid用户。再试一下:


[root@rac121 ~]# cd /data01[root@rac121 data01]# lltotal 3764984drwxr-xr-x 8 oracle oinstall       4096 Jun 18 17:08 databasedrwxr-xr-x 2 root   root           4096 May 28 17:24 dnsdrwxr-xr-x 8 grid        203       4096 May 26 22:29 grid-rw-r--r-- 1 root   root         816717 May 24 22:15 iscsi-initiator-utils-6.2.0.871-0.10.el5.x86_64.rpmdrwx------ 2 root   root          16384 Dec 23  2011 lost+found-rw-r--r-- 1 root   root         136910 May 25 23:58 oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm-rw-r--r-- 1 root   root          14176 May 25 22:51 oracleasmlib-2.0.4-1.el5.x86_64.rpm-rw-r--r-- 1 root   root          91430 May 25 22:50 oracleasm-support-2.1.7-1.el5.x86_64.rpm-rw-r--r-- 1 root   root     1358454646 May 23 10:20 p10404530_112030_Linux-x86-64_1of7.zip-rw-r--r-- 1 root   root     1142195302 May 23 10:20 p10404530_112030_Linux-x86-64_2of7.zip-rw-r--r-- 1 root   root      979195792 May 23 10:18 p10404530_112030_Linux-x86-64_3of7.zipdrwxrwxr-x 4 root   root           4096 Jun 28 11:05 p13348650-rw-r--r-- 1 root   root      335597984 May 23 10:18 p13348650_112030_Linux-x86-64.zip-rw-r--r-- 1 root   root       32510817 Jun 29 09:21 p6880880_112000_Linux-x86-64.zipdrwxrwxr-x 6    286 wheel          4096 Jun 19 08:06 readline-6.1-rw-r--r-- 1 root   root        2261725 Jun 19 08:05 readline-6.1.tar.gzdrwxrwxrwx 8    500      500       4096 May 23 10:02 rlwrap-0.30-rw-r--r-- 1 root   root         184037 May 23 09:55 rlwrap-0.30.tar.gzdrwxr-xr-x 2 root   root           4096 Jun 12 09:43 rpmdrwxr-xr-x 4 root   root           4096 Apr 20 11:26 TESTGRP[root@rac121 data01]# chown -R grid:oinstall p13348650

                再重新进行安装

[root@rac121 /]# /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/opatch auto /data01/p13348650  -ocmrf /home/grid/ocm.rspExecuting /usr/bin/perl /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/patch112.pl -patchdir /data01 -patchn p13348650 -ocmrf /home/grid/ocm.rsp -paramfile /oradata/oracleapp/11.2.0/grid/crs/install/crsconfig_paramsopatch auto log file location is /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/../../cfgtoollogs/opatchauto2012-06-29_10-53-47.logDetected Oracle Clusterware installUsing configuration parameter file: /oradata/oracleapp/11.2.0/grid/crs/install/crsconfig_paramspatch /data01/p13348650/13348650/custom/server/13348650  apply successful for home  /oradata/oracleapp/oracle/product/11.2.0/db1patch /data01/p13348650/13343438  apply successful for home  /oradata/oracleapp/oracle/product/11.2.0/db1Successfully unlock /oradata/oracleapp/11.2.0/gridpatch /data01/p13348650/13348650  apply successful for home  /oradata/oracleapp/11.2.0/gridpatch /data01/p13348650/13343438  apply successful for home  /oradata/oracleapp/11.2.0/gridACFS-9300: ADVM/ACFS distribution files found.ACFS-9312: Existing ADVM/ACFS installation detected.ACFS-9314: Removing previous ADVM/ACFS installation.ACFS-9315: Previous ADVM/ACFS components successfully removed.ACFS-9307: Installing requested ADVM/ACFS software.ACFS-9308: Loading installed ADVM/ACFS drivers.ACFS-9321: Creating udev for ADVM/ACFS.ACFS-9323: Creating module dependencies - this may take some time.ACFS-9154: Loading 'oracleoks.ko' driver.ACFS-9154: Loading 'oracleadvm.ko' driver.ACFS-9154: Loading 'oracleacfs.ko' driver.ACFS-9327: Verifying ADVM/ACFS devices.ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'.ACFS-9156: Detecting control device '/dev/ofsctl'.ACFS-9309: ADVM/ACFS installation correctness verified.CRS-4123: Oracle High Availability Services has been started.[root@rac121 /]# 
         上面没再报错,安装成功,原因还是有些模糊,先解决再说吧。再在节点2上做同样的操作。

            

      9.2、在数据库中执行psu apply

[root@rac121 ~]# su - oracle[oracle@rac121 ~]$ cd $ORACLE_HOME[oracle@rac121 db1]$ cd rdbms/admin[oracle@rac121 admin]$ sqlplus /nologSQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 28 15:49:21 2012Copyright (c) 1982, 2011, Oracle.  All rights reserved.SQL> conn / as sysdbaConnected.SQL> @catbundle.sql psu applyPL/SQL procedure successfully completed.PL/SQL procedure successfully completed.PL/SQL procedure successfully completed.Generating apply and rollback scripts...Check the following file for errors:/oradata/oracleapp/oracle/cfgtoollogs/catbundle/catbundle_PSU_RACDB_GENERATE_2012Jun28_15_50_02.logApply script: /oradata/oracleapp/oracle/product/11.2.0/db1/rdbms/admin/catbundle_PSU_RACDB_APPLY.sqlRollback script: /oradata/oracleapp/oracle/product/11.2.0/db1/rdbms/admin/catbundle_PSU_RACDB_ROLLBACK.sqlPL/SQL procedure successfully completed.Executing script file...SQL> COLUMN spool_file NEW_VALUE spool_file NOPRINTSQL> SELECT '/oradata/oracleapp/oracle/cfgtoollogs/catbundle/' || 'catbundle_PSU_' || name || '_APPLY_' || TO_CHAR(SYSDATE, 'YYYYMonDD_hh24_mi_ss', 'NLS_DATE_LANGUAGE=''AMERICAN''') || '.log' AS spool_file FROM v$database;SQL> SPOOL &spool_fileSQL> exec dbms_registry.set_session_namespace('SERVER')PL/SQL procedure successfully completed.SQL> ALTER SESSION SET current_schema = SYS;Session altered.SQL> PROMPT Updating registry...Updating registry...SQL> INSERT INTO registry$history  2    (action_time, action,  3     namespace, version, id,  4     bundle_series, comments)  5  VALUES  6    (SYSTIMESTAMP, 'APPLY',  7     SYS_CONTEXT('REGISTRY$CTX','NAMESPACE'),  8     '11.2.0.3',  9     1, 10     'PSU', 11     'PSU 11.2.0.3.1');1 row created.SQL> COMMIT;Commit complete.SQL> SPOOL offSQL> SET echo offCheck the following log file for errors:/oradata/oracleapp/oracle/cfgtoollogs/catbundle/catbundle_PSU_RACDB_APPLY_2012Jun28_15_50_04.logSQL> 

10、验证PSU安装信息

      10.1 DB PSU安装验证

       第1个节点:

[oracle@rac121 ~]$ cd $ORACLE_HOME/OPatch[oracle@rac121 OPatch]$ ./opatch lsinventoryOracle Interim Patch Installer version 11.2.0.3.0Copyright (c) 2012, Oracle Corporation.  All rights reserved.Oracle Home       : /oradata/oracleapp/oracle/product/11.2.0/db1Central Inventory : /u01/app/oraInventory   from           : /oradata/oracleapp/oracle/product/11.2.0/db1/oraInst.locOPatch version    : 11.2.0.3.0OUI version       : 11.2.0.3.0Log file location : /oradata/oracleapp/oracle/product/11.2.0/db1/cfgtoollogs/opatch/opatch2012-06-28_16-11-09PM_1.logLsinventory Output file location : /oradata/oracleapp/oracle/product/11.2.0/db1/cfgtoollogs/opatch/lsinv/lsinventory2012-06-28_16-11-09PM.txt--------------------------------------------------------------------------------Installed Top-level Products (1): Oracle Database 11g                                                  11.2.0.3.0There are 1 products installed in this Oracle Home.Interim patches (2) :Patch  13343438     : applied on Thu Jun 28 15:43:27 CST 2012Unique Patch ID:  14274976Patch description:  "Database Patch Set Update : 11.2.0.3.1 (13343438)"   Created on 3 Jan 2012, 02:50:27 hrs PST8PDT   Bugs fixed:     12998795, 13466801, 13492735, 12834027, 12620823, 13035804, 13362079     12718090, 13528551, 13041324, 13343438, 12917230, 12847466, 9703627     12797765, 12950644, 12905058, 13499128, 12861463, 9873405, 12938841Patch  13348650     : applied on Thu Jun 28 15:42:58 CST 2012Unique Patch ID:  14274976Patch description:  "Grid Infrastructure Patch Set Update : 11.2.0.3.1 (13348650)"   Created on 14 Jan 2012, 08:08:00 hrs PST8PDT   Bugs fixed:     13348650, 13039908, 12794268, 13011520, 12784559, 12758736, 13077654     13001901, 13074261, 12971251, 12538907, 13066371, 12857064, 12897651     12897902, 12896850, 12726222, 12829429, 12728585, 13396284, 12899169     13079948, 13111013, 12876314, 12867511, 13090686, 12925041, 12995950     13085732, 12848480, 12829917, 12990582, 12849377, 12934171, 12975811     12917897, 12914824, 13082238, 13334158, 12947871, 12950823, 13355963     12878750, 13001955, 13002015, 11836951, 12965049, 13024624, 12765467     12791719, 12885323Rac system comprising of multiple nodes  Local node = rac121  Remote node = rac122--------------------------------------------------------------------------------OPatch succeeded.[oracle@rac121 OPatch]$ 

       第2个节点:

[grid@rac122 OPatch]$ su - oraclePassword: [oracle@rac122 ~]$ cd $ORACLE_HOME/OPatch[oracle@rac122 OPatch]$ ./opatch lsinventoryOracle Interim Patch Installer version 11.2.0.3.0Copyright (c) 2012, Oracle Corporation.  All rights reserved.Oracle Home       : /oradata/oracleapp/oracle/product/11.2.0/db1Central Inventory : /u01/app/oraInventory   from           : /oradata/oracleapp/oracle/product/11.2.0/db1/oraInst.locOPatch version    : 11.2.0.3.0OUI version       : 11.2.0.3.0Log file location : /oradata/oracleapp/oracle/product/11.2.0/db1/cfgtoollogs/opatch/opatch2012-06-28_16-08-15PM_1.logLsinventory Output file location : /oradata/oracleapp/oracle/product/11.2.0/db1/cfgtoollogs/opatch/lsinv/lsinventory2012-06-28_16-08-15PM.txt--------------------------------------------------------------------------------Installed Top-level Products (1): Oracle Database 11g                                                  11.2.0.3.0There are 1 products installed in this Oracle Home.Interim patches (2) :Patch  13343438     : applied on Thu Jun 28 15:46:48 CST 2012Unique Patch ID:  14274976Patch description:  "Database Patch Set Update : 11.2.0.3.1 (13343438)"   Created on 3 Jan 2012, 02:50:27 hrs PST8PDT   Bugs fixed:     12998795, 13466801, 13492735, 12834027, 12620823, 13035804, 13362079     12718090, 13528551, 13041324, 13343438, 12917230, 12847466, 9703627     12797765, 12950644, 12905058, 13499128, 12861463, 9873405, 12938841Patch  13348650     : applied on Thu Jun 28 15:46:19 CST 2012Unique Patch ID:  14274976Patch description:  "Grid Infrastructure Patch Set Update : 11.2.0.3.1 (13348650)"   Created on 14 Jan 2012, 08:08:00 hrs PST8PDT   Bugs fixed:     13348650, 13039908, 12794268, 13011520, 12784559, 12758736, 13077654     13001901, 13074261, 12971251, 12538907, 13066371, 12857064, 12897651     12897902, 12896850, 12726222, 12829429, 12728585, 13396284, 12899169     13079948, 13111013, 12876314, 12867511, 13090686, 12925041, 12995950     13085732, 12848480, 12829917, 12990582, 12849377, 12934171, 12975811     12917897, 12914824, 13082238, 13334158, 12947871, 12950823, 13355963     12878750, 13001955, 13002015, 11836951, 12965049, 13024624, 12765467     12791719, 12885323Rac system comprising of multiple nodes  Local node = rac122  Remote node = rac121--------------------------------------------------------------------------------OPatch succeeded.[oracle@rac122 OPatch]$ 

           10.2  GI  PSU安装验证:

                      第1个节点:

[oracle@rac121 p13348650]$ su - gridPassword: [grid@rac121 ~]$ $ORACLE_HOME/OPatch/opatch lsinventoryOracle Interim Patch Installer version 11.2.0.3.0Copyright (c) 2012, Oracle Corporation.  All rights reserved.Oracle Home       : /oradata/oracleapp/11.2.0/gridCentral Inventory : /u01/app/oraInventory   from           : /oradata/oracleapp/11.2.0/grid/oraInst.locOPatch version    : 11.2.0.3.0OUI version       : 11.2.0.3.0Log file location : /oradata/oracleapp/11.2.0/grid/cfgtoollogs/opatch/opatch2012-06-29_11-03-14AM_1.logLsinventory Output file location : /oradata/oracleapp/11.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2012-06-29_11-03-14AM.txt--------------------------------------------------------------------------------Installed Top-level Products (1): Oracle Grid Infrastructure                                           11.2.0.3.0There are 1 products installed in this Oracle Home.Interim patches (2) :Patch  13343438     : applied on Fri Jun 29 11:00:53 CST 2012Unique Patch ID:  14274976Patch description:  "Database Patch Set Update : 11.2.0.3.1 (13343438)"   Created on 3 Jan 2012, 02:50:27 hrs PST8PDT   Bugs fixed:     12998795, 13466801, 13492735, 12834027, 12620823, 13035804, 13362079     12718090, 13528551, 13041324, 13343438, 12917230, 12847466, 9703627     12797765, 12950644, 12905058, 13499128, 12861463, 9873405, 12938841Patch  13348650     : applied on Fri Jun 29 10:59:53 CST 2012Unique Patch ID:  14274976Patch description:  "Grid Infrastructure Patch Set Update : 11.2.0.3.1 (13348650)"   Created on 14 Jan 2012, 08:08:00 hrs PST8PDT   Bugs fixed:     13348650, 13039908, 12794268, 13011520, 12784559, 12758736, 13077654     13001901, 13074261, 12971251, 12538907, 13066371, 12857064, 12897651     12897902, 12896850, 12726222, 12829429, 12728585, 13396284, 12899169     13079948, 13111013, 12876314, 12867511, 13090686, 12925041, 12995950     13085732, 12848480, 12829917, 12990582, 12849377, 12934171, 12975811     12917897, 12914824, 13082238, 13334158, 12947871, 12950823, 13355963     12878750, 13001955, 13002015, 11836951, 12965049, 13024624, 12765467     12791719, 12885323, 13345868, 13019958, 13255295, 12810890, 12782756     12823042, 12825835, 12932852, 12695029, 12873909, 13263435, 13038806     12820045, 12842804, 12827493, 13396356, 13045518, 12765868, 12834777     13068077, 12772345, 12823838Rac system comprising of multiple nodes  Local node = rac121  Remote node = rac122--------------------------------------------------------------------------------OPatch succeeded.[grid@rac121 ~]$ 

                      第2个节点:

[grid@rac122 ~]$ $ORACLE_HOME/OPatch/opatch lsinventoryOracle Interim Patch Installer version 11.2.0.3.0Copyright (c) 2012, Oracle Corporation.  All rights reserved.Oracle Home       : /oradata/oracleapp/11.2.0/gridCentral Inventory : /u01/app/oraInventory   from           : /oradata/oracleapp/11.2.0/grid/oraInst.locOPatch version    : 11.2.0.3.0OUI version       : 11.2.0.3.0Log file location : /oradata/oracleapp/11.2.0/grid/cfgtoollogs/opatch/opatch2012-06-29_11-33-12AM_1.logLsinventory Output file location : /oradata/oracleapp/11.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2012-06-29_11-33-12AM.txt--------------------------------------------------------------------------------Installed Top-level Products (1): Oracle Grid Infrastructure                                           11.2.0.3.0There are 1 products installed in this Oracle Home.Interim patches (2) :Patch  13343438     : applied on Fri Jun 29 11:29:56 CST 2012Unique Patch ID:  14274976Patch description:  "Database Patch Set Update : 11.2.0.3.1 (13343438)"   Created on 3 Jan 2012, 02:50:27 hrs PST8PDT   Bugs fixed:     12998795, 13466801, 13492735, 12834027, 12620823, 13035804, 13362079     12718090, 13528551, 13041324, 13343438, 12917230, 12847466, 9703627     12797765, 12950644, 12905058, 13499128, 12861463, 9873405, 12938841Patch  13348650     : applied on Fri Jun 29 11:28:58 CST 2012Unique Patch ID:  14274976Patch description:  "Grid Infrastructure Patch Set Update : 11.2.0.3.1 (13348650)"   Created on 14 Jan 2012, 08:08:00 hrs PST8PDT   Bugs fixed:     13348650, 13039908, 12794268, 13011520, 12784559, 12758736, 13077654     13001901, 13074261, 12971251, 12538907, 13066371, 12857064, 12897651     12897902, 12896850, 12726222, 12829429, 12728585, 13396284, 12899169     13079948, 13111013, 12876314, 12867511, 13090686, 12925041, 12995950     13085732, 12848480, 12829917, 12990582, 12849377, 12934171, 12975811     12917897, 12914824, 13082238, 13334158, 12947871, 12950823, 13355963     12878750, 13001955, 13002015, 11836951, 12965049, 13024624, 12765467     12791719, 12885323, 13345868, 13019958, 13255295, 12810890, 12782756     12823042, 12825835, 12932852, 12695029, 12873909, 13263435, 13038806     12820045, 12842804, 12827493, 13396356, 13045518, 12765868, 12834777     13068077, 12772345, 12823838Rac system comprising of multiple nodes  Local node = rac122  Remote node = rac121--------------------------------------------------------------------------------OPatch succeeded.

        10.3 数据库实例PSU安装验证

[oracle@rac122 OPatch]$ sqlplus /nologSQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 28 16:13:37 2012Copyright (c) 1982, 2011, Oracle.  All rights reserved.SQL> conn / as sysdbaConnected.SQL> col action format a15SQL> col comments format a30SQL> select action ,comments from registry$history;ACTION          COMMENTS--------------- ------------------------------APPLY           Patchset 11.2.0.2.0APPLY           PSU 11.2.0.3.1SQL> 






原创粉丝点击