PSU-11g RAC 11.2.0.3.0 升级到11.2.0.3.1

前言:

oracle的PSU升级不更新数据字典,风险较小,但是还是需要停库进行升级操作

patch  在rac  gi ,oracle 下可以一起打,也可以单独打,但是注意:

1,检查升级前的版本及patch 工具版本。

    $cd $GRID_HOME[$ORACLE_HOME]/OPatch 

    $./opatch version (-help)    --查看是否success 或者是否达到当前将要升级 patch 工具版本的要求。

    $ ./opatch  lsinventory -detail -oh $ORACLE_HOME/[$GRID_HOME/]    --查看是否成功。

    $. 通过 SQL> select action ,comments from registry$history;  查看是否已有patch 版本使用。


  2, 查看解压出来的patch 补丁 中 的 README 文档,按文档要求 执行。


  3,原系统的oPatch 工具 版本低,需要将下载 适合patch 工具 来替代:

      直接将原系统的 oPatch 下的文件 mv 掉(or rm ) , 将 新oPatch tool 解压 至本路径下。


   4,创建  ocm response file 文件:  在解压oPatch 工具下: (两个节点,两个用户下都需要)

[root@martin02 OPatch]# /dba/app/11.2.0.4/grid/OPatch/ocm/bin/emocmrsp

OCM Installation Response Generator 10.3.7.0.0 - Production

Copyright (c) 2005, 2012, 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:         


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]:  y

The OCM configuration response file (ocm.rsp) was successfully created.


[root@martin02 OPatch]# ls

crs   emdpatch.pl  ocm      opatch          opatch.bat  opatchdiag.bat  opatchprereqs  operr.bat         oplan       scripts

docs  jlib         ocm.rsp  opatchauto-dir  opatchdiag  opatch.pl       operr          operr_readme.txt  README.txt  version.txt
2.生成响应文件
cd /oracle/11.2.0/grid/OPatch/ocm/bin
./emocmrsp
 
3,自动打补丁,打补丁的时候grid会自动重启
数据库启动状态 su -root
/oracle/11.2.0/grid/OPatch/opatch auto /oracle/media/psu -ocmrf /oracle/11.2.0/grid/OPatch/ocm/bin/ocm.rsp
 
此步操作我们需要注意几个问题
(1) 补丁集的属组需要为oracle:oinstall
(2) 我们需要断开一切的数据库的连接,不然的话在进行升级的时候会报错
optach auto的过程中我们是看不到具体的错误内容的
它的安装日志在/u01/app/11.2.0/grid/cfgtoollogs这个文件夹下来,如果遇到错误,我们可以看到详细的错误日志,从而分析出错误的原因
(3) 进行opatch auto的时候我们需要关闭掉数据库,grid可以不用关闭,在升级的时候会自动

  5,将解压的patch 升级包至 某个路径下,(注意权限 grid, oracle 可以访问执行权限)

        6, 升级是,如果是单实例,可以不管库,但是最好把em , or  em12c 关闭
              $ emctl stop dbconsole 
      
        7, 如果 是 RAC 环境,需要 关闭库,  
              $ srvctl stop  database -d  db_unique_name -o immediate
       
        8, 升级命令,单独分开:
           $ ./opatch auto /dba/soft/20996923/ -oh /dba/app/oracle/product/11.2.0.4/dbhome_1/ -ocmrf ocm.rsp
           $ ./opatch auto /dba/soft/20996923/ -oh /dba/app/11.2.0.4/grid/ -ocmrf ocm.rsp
          
           合并:
            $ ./opatch auto /dba/soft/20996923/ -oh  $GRID_HOME/,$ORACLE_HOME/ -ocmrf ocm.rsp
    

        9,  升级 success 完成后, 在 $ORACLE_HOME/rdbms/admin  下运行 脚本:

                   SQL >@catbundle.sql psu apply
                   SQL >@utlrp.sql
    10, 检查:     ./opatch lsinventory (重复上面检查项)

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

         11, 如果升级失败,需要回滚,请参考README 


--测试参考

1、环境介绍: 升级1,升级 两个文件

两台主机,操作系统

[root@rac121 ~]# cat /proc/version Linux 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 -a LSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch Distributor ID: RedHatEnterpriseServer Description:    Red Hat Enterprise Linux Server release 5.4 (Tikanga) Release:        5.4 Codename:       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]$ ls
docs  emdpatch.pl  fmw  jlib  ocm  opatch  opatch.bat  opatch.ini  opatch.pl  opatchprereqs
[oracle@rac121 OPatch]$ ./opatch version
Invoking OPatch 11.2.0.1.7

OPatch Version: 11.2.0.1.7

OPatch succeeded.
[oracle@rac121 OPatch]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 28 10:46:39 2012

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected.
SQL> col action format a15 
SQL> col comments format a30
SQL> select action,comments from registry$history;

ACTION          COMMENTS
--------------- ------------------------------
APPLY           Patchset 11.2.0.2.0

SQL> 

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]# ll
drwxr-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]# ll
total 128
drwxr-xr-x 4 root root   4096 Jan 15 00:08 13343438
drwxr-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]$ ls
p6880880_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]$ ll
total 140
drwxrwxr-x 3 oracle oinstall  4096 Mar 22 03:25 crs
drwxr-xr-x 2 oracle oinstall  4096 Jun 28 11:29 docs
-rw-rw-r-- 1 oracle oinstall 23695 Mar 22 03:24 emdpatch.pl
drwxr-xr-x 2 oracle oinstall  4096 Jun 18 16:16 fmw
drwxr-xr-x 2 oracle oinstall  4096 Jun 28 11:29 jlib
drwxr-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.pl
drwxr-xr-x 4 oracle oinstall  4096 Jun 28 11:29 opatchprereqs
drwxrwxr-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 version
OPatch 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]$ ls
13343438  13348650  bundle.xml  README.html  README.txt
[grid@rac121 p13348650]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./13343438 -oh $ORACLE_HOME
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /oradata/oracleapp/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /oradata/oracleapp/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /oradata/oracleapp/11.2.0/grid/cfgtoollogs/opatch/opatch2012-06-28_14-06-34PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[grid@rac121 p13348650]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./13348650 -oh $ORACLE_HOME
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /oradata/oracleapp/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /oradata/oracleapp/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /oradata/oracleapp/11.2.0/grid/cfgtoollogs/opatch/opatch2012-06-28_14-19-15PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[grid@rac121 p13348650]$ su - oracle
Password: 
[oracle@rac121 ~]$ cd /data01/p13348650
[oracle@rac121 p13348650]$ ls
13343438  13348650  bundle.xml  README.html  README.txt
[oracle@rac121 p13348650]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./13343438 -oh $ORACLE_HOME
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /oradata/oracleapp/oracle/product/11.2.0/db1
Central Inventory : /u01/app/oraInventory
   from           : /oradata/oracleapp/oracle/product/11.2.0/db1/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /oradata/oracleapp/oracle/product/11.2.0/db1/cfgtoollogs/opatch/opatch2012-06-28_14-22-56PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@rac121 p13348650]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./13348650/custom/server/13348650 -oh $ORACLE_HOME
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /oradata/oracleapp/oracle/product/11.2.0/db1
Central Inventory : /u01/app/oraInventory
   from           : /oradata/oracleapp/oracle/product/11.2.0/db1/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /oradata/oracleapp/oracle/product/11.2.0/db1/cfgtoollogs/opatch/opatch2012-06-28_14-24-59PM_1.log

Invoking 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.rsp
Executing /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_params
opatch auto log file location is /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/../../cfgtoollogs/opatchauto2012-06-29_10-19-39.log
Detected Oracle Clusterware install
Using configuration parameter file: /oradata/oracleapp/11.2.0/grid/crs/install/crsconfig_params
patch /data01/p13348650/13348650/custom/server/13348650  apply successful for home  /oradata/oracleapp/oracle/product/11.2.0/db1
patch /data01/p13348650/13343438  apply successful for home  /oradata/oracleapp/oracle/product/11.2.0/db1
Successfully unlock /oradata/oracleapp/11.2.0/grid
The opatch Applicable check failed for /oradata/oracleapp/11.2.0/grid.  The patch is not applicable for /oradata/oracleapp/11.2.0/grid
patch /data01/p13348650/13348650  apply  failed  for home  /oradata/oracleapp/11.2.0/grid
ACFS-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]# ll
total 3764984
drwxr-xr-x 8 oracle oinstall       4096 Jun 18 17:08 database
drwxr-xr-x 2 root   root           4096 May 28 17:24 dns
drwxr-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.rpm
drwx------ 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.zip
drwxrwxr-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.zip
drwxrwxr-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.gz
drwxrwxrwx 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.gz
drwxr-xr-x 2 root   root           4096 Jun 12 09:43 rpm
drwxr-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.rsp
Executing /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_params
opatch auto log file location is /oradata/oracleapp/oracle/product/11.2.0/db1/OPatch/crs/../../cfgtoollogs/opatchauto2012-06-29_10-53-47.log
Detected Oracle Clusterware install
Using configuration parameter file: /oradata/oracleapp/11.2.0/grid/crs/install/crsconfig_params
patch /data01/p13348650/13348650/custom/server/13348650  apply successful for home  /oradata/oracleapp/oracle/product/11.2.0/db1
patch /data01/p13348650/13343438  apply successful for home  /oradata/oracleapp/oracle/product/11.2.0/db1
Successfully unlock /oradata/oracleapp/11.2.0/grid
patch /data01/p13348650/13348650  apply successful for home  /oradata/oracleapp/11.2.0/grid
patch /data01/p13348650/13343438  apply successful for home  /oradata/oracleapp/11.2.0/grid
ACFS-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 /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 28 15:49:21 2012

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected.
SQL> @catbundle.sql psu apply

PL/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.log
Apply script: /oradata/oracleapp/oracle/product/11.2.0/db1/rdbms/admin/catbundle_PSU_RACDB_APPLY.sql
Rollback script: /oradata/oracleapp/oracle/product/11.2.0/db1/rdbms/admin/catbundle_PSU_RACDB_ROLLBACK.sql

PL/SQL procedure successfully completed.

Executing script file...

SQL> COLUMN spool_file NEW_VALUE spool_file NOPRINT
SQL> 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_file
SQL> 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 off
SQL> SET echo off
Check the following log file for errors:
/oradata/oracleapp/oracle/cfgtoollogs/catbundle/catbundle_PSU_RACDB_APPLY_2012Jun28_15_50_04.log
SQL> 
If the OJVM PSU was applied for a previous GI PSU patch, you may see invalid Java classes after execution of the  catbundle.sql  script in the previous step. If this is the case, run   utlrp.sql  to re-validate these Java classes.
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

10、验证PSU安装信息:

      10.1 DB PSU安装验证

       第1个节点:

[oracle@rac121 ~]$ cd $ORACLE_HOME/OPatch
[oracle@rac121 OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

Oracle Home       : /oradata/oracleapp/oracle/product/11.2.0/db1
Central Inventory : /u01/app/oraInventory
   from           : /oradata/oracleapp/oracle/product/11.2.0/db1/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /oradata/oracleapp/oracle/product/11.2.0/db1/cfgtoollogs/opatch/opatch2012-06-28_16-11-09PM_1.log

Lsinventory 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.0
There are 1 products installed in this Oracle Home.

Interim patches (2) :

Patch  13343438     : applied on Thu Jun 28 15:43:27 CST 2012
Unique Patch ID:  14274976
Patch 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, 12938841

Patch  13348650     : applied on Thu Jun 28 15:42:58 CST 2012
Unique Patch ID:  14274976
Patch 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

Rac system comprising of multiple nodes
  Local node = rac121
  Remote node = rac122

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

OPatch succeeded.
[oracle@rac121 OPatch]$ 

       第2个节点:

[grid@rac122 OPatch]$ su - oracle
Password: 
[oracle@rac122 ~]$ cd $ORACLE_HOME/OPatch
[oracle@rac122 OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

Oracle Home       : /oradata/oracleapp/oracle/product/11.2.0/db1
Central Inventory : /u01/app/oraInventory
   from           : /oradata/oracleapp/oracle/product/11.2.0/db1/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /oradata/oracleapp/oracle/product/11.2.0/db1/cfgtoollogs/opatch/opatch2012-06-28_16-08-15PM_1.log

Lsinventory 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.0
There are 1 products installed in this Oracle Home.

Interim patches (2) :

Patch  13343438     : applied on Thu Jun 28 15:46:48 CST 2012
Unique Patch ID:  14274976
Patch 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, 12938841

Patch  13348650     : applied on Thu Jun 28 15:46:19 CST 2012
Unique Patch ID:  14274976
Patch 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

Rac 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 - grid
Password: 
[grid@rac121 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

Oracle Home       : /oradata/oracleapp/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /oradata/oracleapp/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /oradata/oracleapp/11.2.0/grid/cfgtoollogs/opatch/opatch2012-06-29_11-03-14AM_1.log

Lsinventory 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.0
There are 1 products installed in this Oracle Home.

Interim patches (2) :

Patch  13343438     : applied on Fri Jun 29 11:00:53 CST 2012
Unique Patch ID:  14274976
Patch 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, 12938841


Patch  13348650     : applied on Fri Jun 29 10:59:53 CST 2012
Unique Patch ID:  14274976
Patch 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, 12823838

Rac system comprising of multiple nodes
  Local node = rac121
  Remote node = rac122

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

OPatch succeeded.
[grid@rac121 ~]$ 

                      第2个节点:

[grid@rac122 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

Oracle Home       : /oradata/oracleapp/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /oradata/oracleapp/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /oradata/oracleapp/11.2.0/grid/cfgtoollogs/opatch/opatch2012-06-29_11-33-12AM_1.log

Lsinventory 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.0
There are 1 products installed in this Oracle Home.

Interim patches (2) :

Patch  13343438     : applied on Fri Jun 29 11:29:56 CST 2012
Unique Patch ID:  14274976
Patch 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, 12938841

Patch  13348650     : applied on Fri Jun 29 11:28:58 CST 2012
Unique Patch ID:  14274976
Patch 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, 12823838

Rac system comprising of multiple nodes
  Local node = rac122
  Remote node = rac121

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

OPatch succeeded.

        10.3 数据库实例PSU安装验证:

[oracle@rac122 OPatch]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 28 16:13:37 2012

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected.
SQL> col action format a15
SQL> col comments format a30
SQL> select action ,comments from registry$history;

ACTION          COMMENTS
--------------- ------------------------------
APPLY           Patchset 11.2.0.2.0
APPLY           PSU 11.2.0.3.1

================ASM NODE patch 升级=================
OS :  Redhat  6.4 x86 64bit
DB :  11.2.0.4  


===
    这个是手动升级db的方法,对于有grid结构的数据库,我们可以通过OPATCH AUTO的方式来进行数据库的自动升级,上述方法。
============如果仅是 ORACLE 单实例,则不能使用上述方法 ===============
1, 首先查看 psu readme 文档。
2,如果是oracle 单实例(无gi), 这在环境变量下PATH 设置一个参数,方便
  export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin:$ORACLE_HOME/OPatch:$PATH
3,关闭数据库,监听
4, cd psu 解压包下
  cd /u01/20996923/20760982   because:
5, 应用:  
[oracle@sfpay-sypay-mdb 20760982]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.11
Copyright (c) 2015, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0.4/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0.4/dbhome_1/oraInst.loc
OPatch version    : 11.2.0.3.11
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0.4/dbhome_1/cfgtoollogs/opatch/opatch2015-09-07_12-35-00PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   17478514  18031668  18522509  19121551  19769489  20299013  20760982  

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
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: 

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]:  y



Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/dbhome_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying sub-patch '17478514' to OH '/u01/app/oracle/product/11.2.0.4/dbhome_1'

Patching component oracle.rdbms, 11.2.0.4.0...

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

Patching component oracle.sdo, 11.2.0.4.0...

Patching component oracle.sysman.agent, 10.2.0.4.5...

Patching component oracle.xdk, 11.2.0.4.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

Patching component oracle.sdo.locator, 11.2.0.4.0...

Patching component oracle.nlsrtl.rsf, 11.2.0.4.0...

Patching component oracle.xdk.rsf, 11.2.0.4.0...

Patching component oracle.rdbms.rman, 11.2.0.4.0...

Verifying the update...
Applying sub-patch '18031668' to OH '/u01/app/oracle/product/11.2.0.4/dbhome_1'

Patching component oracle.rdbms, 11.2.0.4.0...

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

Patching component oracle.ldap.rsf, 11.2.0.4.0...

Patching component oracle.rdbms.crs, 11.2.0.4.0...

Patching component oracle.precomp.common, 11.2.0.4.0...

Patching component oracle.ldap.rsf.ic, 11.2.0.4.0...

Patching component oracle.rdbms.deconfig, 11.2.0.4.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

Patching component oracle.rdbms.rman, 11.2.0.4.0...

Verifying the update...
Applying sub-patch '18522509' to OH '/u01/app/oracle/product/11.2.0.4/dbhome_1'

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

Patching component oracle.rdbms, 11.2.0.4.0...

Patching component oracle.precomp.common, 11.2.0.4.0...

Patching component oracle.rdbms.rman, 11.2.0.4.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

Patching component oracle.rdbms.deconfig, 11.2.0.4.0...

Verifying the update...
Applying sub-patch '19121551' to OH '/u01/app/oracle/product/11.2.0.4/dbhome_1'

Patching component oracle.precomp.common, 11.2.0.4.0...

Patching component oracle.sysman.console.db, 11.2.0.4.0...

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

Patching component oracle.rdbms.rman, 11.2.0.4.0...

Patching component oracle.rdbms, 11.2.0.4.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

Patching component oracle.ordim.client, 11.2.0.4.0...

Patching component oracle.ordim.jai, 11.2.0.4.0...

Verifying the update...
Applying sub-patch '19769489' to OH '/u01/app/oracle/product/11.2.0.4/dbhome_1'
ApplySession: Optional component(s) [ oracle.sysman.agent, 11.2.0.4.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.precomp.common, 11.2.0.4.0...

Patching component oracle.ovm, 11.2.0.4.0...

Patching component oracle.xdk, 11.2.0.4.0...

Patching component oracle.rdbms.util, 11.2.0.4.0...

Patching component oracle.rdbms, 11.2.0.4.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

Patching component oracle.xdk.parser.java, 11.2.0.4.0...

Patching component oracle.oraolap, 11.2.0.4.0...

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

Patching component oracle.xdk.rsf, 11.2.0.4.0...

Patching component oracle.rdbms.rman, 11.2.0.4.0...

Patching component oracle.rdbms.deconfig, 11.2.0.4.0...

Verifying the update...
Applying sub-patch '20299013' to OH '/u01/app/oracle/product/11.2.0.4/dbhome_1'

Patching component oracle.rdbms.dv, 11.2.0.4.0...

Patching component oracle.rdbms.oci, 11.2.0.4.0...

Patching component oracle.precomp.common, 11.2.0.4.0...

Patching component oracle.sysman.agent, 10.2.0.4.5...

Patching component oracle.xdk, 11.2.0.4.0...

Patching component oracle.sysman.common, 10.2.0.4.5...

Patching component oracle.rdbms, 11.2.0.4.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

Patching component oracle.xdk.parser.java, 11.2.0.4.0...

Patching component oracle.sysman.console.db, 11.2.0.4.0...

Patching component oracle.xdk.rsf, 11.2.0.4.0...

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

Patching component oracle.sysman.common.core, 10.2.0.4.5...

Patching component oracle.rdbms.rman, 11.2.0.4.0...

Patching component oracle.rdbms.deconfig, 11.2.0.4.0...

Verifying the update...
Applying sub-patch '20760982' to OH '/u01/app/oracle/product/11.2.0.4/dbhome_1'

Patching component oracle.sysman.console.db, 11.2.0.4.0...

Patching component oracle.rdbms, 11.2.0.4.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

Verifying the update...
Composite patch 20760982 successfully applied.
Log file location: /u01/app/oracle/product/11.2.0.4/dbhome_1/cfgtoollogs/opatch/opatch2015-09-07_12-35-00PM_1.log

OPatch succeeded.

六: 检查结果
[oracle@sfpay-sypay-mdb 20760982]$ cd /u01/app/oracle/product/11.2.0.4/dbhome_1/OPatch/
[oracle@sfpay-sypay-mdb OPatch]$ opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.11
Copyright (c) 2015, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0.4/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0.4/dbhome_1/oraInst.loc
OPatch version    : 11.2.0.3.11
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0.4/dbhome_1/cfgtoollogs/opatch/opatch2015-09-07_12-43-45PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0.4/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2015-09-07_12-43-45PM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: sfpay-sypay-mdb
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1): 

Oracle Database 11g                                                  11.2.0.4.0
There are 1 products installed in this Oracle Home.


Interim patches (1) :

Patch  20760982     : applied on Mon Sep 07 12:36:19 CST 2015
Unique Patch ID:  18908105
Patch description:  "Database Patch Set Update : 11.2.0.4.7 (20760982)"
   Created on 4 Jun 2015, 00:23:20 hrs PST8PDT
Sub-patch  20299013; "Database Patch Set Update : 11.2.0.4.6 (20299013)"
Sub-patch  19769489; "Database Patch Set Update : 11.2.0.4.5 (19769489)"
Sub-patch  19121551; "Database Patch Set Update : 11.2.0.4.4 (19121551)"
Sub-patch  18522509; "Database Patch Set Update : 11.2.0.4.3 (18522509)"
Sub-patch  18031668; "Database Patch Set Update : 11.2.0.4.2 (18031668)"
Sub-patch  17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"
   Bugs fixed:
     17288409, 21051852, 18607546, 17205719, 17811429, 17816865, 20506699
     17922254, 17754782, 16934803, 13364795, 17311728, 17441661, 17284817
     16992075, 17446237, 14015842, 19972569, 17449815, 17375354, 19463897
     17982555, 17235750, 13866822, 18317531, 17478514, 18235390, 14338435
     20803583, 13944971, 20142975, 17811789, 16929165, 18704244, 20506706
     17546973, 20334344, 14054676, 17088068, 18264060, 17346091, 17343514
     19680952, 18471685, 19211724, 13951456, 16315398, 18744139, 16850630
     19049453, 18673304, 17883081, 19915271, 18641419, 18262334, 17006183
     18277454, 16833527, 10136473, 18051556, 17865671, 17852463, 18554871
     17853498, 18334586, 17588480, 17551709, 19827973, 17842825, 17344412
     18828868, 17025461, 11883252, 13609098, 17239687, 17602269, 19197175
     18316692, 17313525, 12611721, 19544839, 18964939, 17600719, 18191164
     19393542, 17571306, 20777150, 18482502, 19466309, 17040527, 17165204
     18098207, 16785708, 17174582, 16180763, 17465741, 16777840, 12982566
     19463893, 12816846, 16875449, 17237521, 19358317, 17811438, 17811447
     17945983, 18762750, 17184721, 16912439, 18061914, 17282229, 18331850
     18202441, 17082359, 18723434, 19554106, 14034426, 18339044, 19458377
     17752995, 17891943, 17258090, 17767676, 16668584, 18384391, 17040764
     17381384, 15913355, 18356166, 14084247, 20506715, 13853126, 18203837
     14245531, 16043574, 17848897, 17877323, 17468141, 17786518, 17912217
     17037130, 18155762, 16956380, 17478145, 17394950, 18189036, 18641461
     18619917, 17027426, 16268425, 19584068, 18436307, 17265217, 17634921
     13498382, 20004087, 17443671, 18000422, 20004021, 17571039, 21067387
     16344544, 18009564, 14354737, 18135678, 18614015, 18362222, 17835048
     16472716, 17936109, 17050888, 17325413, 14010183, 18747196, 17761775
     16721594, 17082983, 20067212, 21179898, 17302277, 18084625, 15990359
     18203835, 17297939, 16731148, 17811456, 17215560, 13829543, 14133975
     17694209, 18091059, 17385178, 8322815, 17586955, 17201159, 17655634
     18331812, 19730508, 18868646, 17648596, 16220077, 16069901, 17348614
     17393915, 17957017, 17274537, 18096714, 17308789, 18436647, 14285317
     19289642, 14764829, 18328509, 17622427, 16943711, 14368995, 17346671
     18996843, 17783588, 16618694, 17672719, 18856999, 18783224, 17851160
     17546761, 17798953, 18273830, 19972566, 16384983, 17726838, 17360606
     13645875, 18199537, 16542886, 17889549, 14565184, 17071721, 20299015
     17610798, 20657441, 17397545, 18230522, 16360112, 19769489, 12905058
     18641451, 12747740, 18430495, 17042658, 17016369, 14602788, 19972568
     19788842, 18508861, 14657740, 17332800, 13837378, 19972564, 17186905
     18315328, 19699191, 17437634, 19006849, 19013183, 17296856, 18674024
     17232014, 16855292, 21051840, 14692762, 17762296, 17705023, 19121551
     19854503, 19309466, 18681862, 20558005, 17390160, 18554763, 18456514
     13955826, 16306373, 18139690, 17501491, 17299889, 17752121, 17889583
     18673325, 18293054, 17242746, 17951233, 17649265, 18094246, 19615136
     17011832, 16870214, 17477958, 18522509, 20631274, 16091637, 17323222
     16595641, 16524926, 18228645, 18282562, 17596908, 17156148, 18031668
     16494615, 17545847, 17614134, 13558557, 17341326, 17891946, 17716305
     16392068, 19271443, 18092127, 17614227, 18440047, 14106803, 16903536
     18973907, 18673342, 17389192, 16194160, 17006570, 17612828, 17721717
     17570240, 17390431, 16863422, 18325460, 19727057, 16422541, 17267114
     19972570, 18244962, 18765602, 18203838, 16198143, 17246576, 14829250
     17835627, 18247991, 14458214, 21051862, 16692232, 17786278, 17227277
     16042673, 16314254, 16228604, 16837842, 17393683, 17787259, 20331945
     20074391, 15861775, 16399083, 18018515, 21051858, 18260550, 17036973
     16613964, 17080436, 16579084, 18384537, 18280813, 20296213, 16901385
     15979965, 18441944, 16450169, 9756271, 17892268, 11733603, 17587063
     16285691, 16538760, 18180390, 18193833, 21051833, 17238511, 17824637
     16571443, 18306996, 14852021, 18674047, 17853456, 12364061

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

OPatch succeeded.

七: 执行脚本:

   
   
执行catbundle.sql将补丁信息反射到数据库中,使数据库知道你最后一次打了什么补丁或者回滚了哪些补丁:
SQL> @?/rdbms/admin/catbundle.sql psu apply --第一个
**********
**********
SQL> COMMIT;
Commit complete.
SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
/u01/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_SYPMDB_APPLY_2015Sep07_12_47_54.log
SQL> 
--这是执行最后完成时结果,可以看看日子。
    SQL > @utlrp.sql      --第二个

八: 查询结果
  SQL > select action ,comments from registry$history;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值