Focus On Oracle

Installing, Backup & Recovery, Performance Tuning,
Troubleshooting, Upgrading, Patching

Oracle Engineered System


当前位置: 首页 » 技术文章 » Oracle

如何使用opatchauto应用补丁?

在集群GRID/RAC环境下,从12c开始我们可以通过root用户使用opatchauto命令安装patch。还可以借助oplan生成应用补丁的计划。这个工具很方便,大大简化了DBA的工作量。

opatchauto流程图

查看opatch版本
[root@ohs1 121]# /pgold/orgrid/oracle/product/121/OPatch/opatch version
OPatch Version: 12.2.0.1.8
OPatch succeeded.
[root@ohs1 121]#

根据实际情况,决定是否使用创建响应文件
opatch版本在12.2.0.1.5之前,如果使用opatchauto去应用补丁,需要使用命令emocmrsp去创建response file,然后通过选项-ocmrf指定响应文件的位置。从12.2.0.1.5开始,OCM不再打包在OPatch中,应用补丁的时候不需要指定-ocmrf。
[oracle@ohs1 bin]$ ./emocmrsp -help
OCM Installation Response Generator 10.3.8.1.1 - Production
Copyright (c) 2005, 2013, Oracle and/or its affiliates.  All rights reserved.

emocmrsp creates a response file used in scripted deployment of the Oracle
Configuration Manager. The response filename is created by default in the
current directory with the filename ocm.rsp.

Usage: emocmrsp [-output <response-file>] [-repeater <OracleSupportHubUrl>] [-help] [-no_banner] [<CSI> [<MosId>]]
                [-verbose <response-file>] [-verify <response-file>]
  where,
    <CSI>                    Customer Support Identifier to be used to
                             register the configuration
    <MosId>                  My Oracle Support id holding the CSI in its My
                             Oracle Support profile

    -help                    Displays this usage information
    -no_banner               Do not display the banner
    -output <response-file>  Creates a response file with the name specified
    -verbose                 Display contents of the response file specified
    -verify                  Verifies a response file for connectivity
    -repeater                Url for Oracle Support Hub used to connect to
                             Oracle. If NONE is specified, no Oracle Support
                             Hub is to be used to communicate with Oracle

Oracle Configuration Manager no longer requires the CSI and My Oracle Support
Id to be specified as part of the installation process. If known, the user can
choose to specify the CSI on the command line. Alternatively, the response
generator prompts for the My Oracle Support username and password alone.
[oracle@ohs1 bin]$ 
ocm.rsp默认的存放位置
 A.$ORACLE_HOME/OPatch/ocm.rsp
 B.$ORACLE_HOME/OPatch/ocm/bin/ocm.rsp

创建response file
/pgold/orgrid/oracle/product/121/OPatch/ocm/bin/emocmrsp -output /tmp/ocm.rsp

opatch版本在12.2.0.1.5之前,需要指定-ocmrf
/pgold/orgrid/oracle/product/121/OPatch/opatchauto apply /mnt/24448103 -ocmrf /pgold/orgrid/oracle/product/121/ocm.rsp

opatch版本在12.2.0.1.5之后,不需要这个选项
/pgold/orgrid/oracle/product/121/OPatch/opatchauto apply /mnt/24448103

opatchauto常用命令
检查patch冲突
[root@ohs3 24448103]# $GI_HOME/OPatch/opatchauto apply -analyze

应用GI和DB patch
[root@ohs3 24448103]# $GI_HOME/OPatch/opatchauto apply

应用GI Patch
[root@ohs3 24448103]# $GI_HOME/OPatch/opatchauto apply -oh <GI_HOME>

应用DB Patch
[root@ohs3 24448103]# $DB_ORACLE_HOME/OPatch/opatchauto apply -oh <DB_HOME>

回滚GI和DB patch
[root@ohs3 24448103]# $GI_HOME/OPatch/opatchauto rollback

回滚GI Patch
[root@ohs3 24448103]# $GI_HOME/OPatch/opatchauto rollback -oh <GI_HOME>

回滚DB Patch
[root@ohs3 24448103]# $DB_ORACLE_HOME/OPatch/opatchauto rollback -oh <DB_HOME>

如何从失败的步骤开始执行
[root@ohs3 24448103]# $GI_HOME/OPatch/opatchauto resume
如果在应用补丁过程中出现问题,解决问题后,可以通过这个命令,继续应用补丁。
注意:由于opatch的版本为12.2.0.1.8,所以不再需要指定-ocmrf


通过opatchauto应用补丁24448103

本文应用的补丁是24448103,是'Data Guard Standby First Installable'类型的补丁,支持使用oplan生成应用补丁的手册,支持通过Enterprise Manager Cloud Control 12c完全自动化应用补丁,且zero-downtime。

Patch 24448103信息

Patch 24448103 - Database Proactive Patch 12.1.0.2.161018 (Oct2016)
Released: October 18, 2016

The Database Proactive Patch 12.1.0.2.161018 (Oct2016) includes updates for both the Clusterware home and Database home that can be applied in a rolling fashion.

This patch is Data Guard Standby First Installable - See Section 2.5, "Installing Database PSU in Standby-First Mode" for more information.

This patch can be applied using Oracle Enterprise Manager Cloud Control 12c version. Oracle Enterprise Manager provides complete automation to patch the cluster in zero-downtime both in In place and Out of Place modes (Out of Place is currently available for Exadata installations only. For more information, see My Oracle Support Note 1265998.1 Patch Oracle Exadata Database Machine via Oracle Enterprise Manager.)

This patch is supported by OPlan. OPlan is a utility that facilitates the patch installation process by providing you with step-by-step patching instructions specific to your environment. The instructions cover both patch application and patch rollback steps. The instructions also cover multiple patching options across In place and Out of Place methodologies. Important Note: 12.1.0.1 GI and RAC Out of Place patching have a few known issues. See My Oracle Support Note 1306814.1 Oracle Software Patching with OPLAN for more detailed information.

环境信息

前置条件
A.下载最新的opatch版本
B.备份当前OPatch,安装新的OPatch
C.需要有足够的空间(15G够用,ORACLE_HOME,GI_HOME),否则会出现类似以下错误

   Prerequisite check "CheckSystemSpace" failed.]
   Failed during Analysis: CheckSystemSpace Failed, [ Prerequisite Status: FAILED, Prerequisite output:
   The details are:
   Required amount of space(12295.097MB) is not available.]
[root@ohs3 product]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_ohs3-lv_root
                       36G   21G   14G  60% /
tmpfs                 3.9G  635M  3.3G  16% /dev/shm
/dev/sda1             477M   81M  367M  19% /boot
patch                 832G  655G  178G  79% /mnt
[root@ohs3 product]#

D.关闭服务器上的进程,比如sqlplus

应用补丁执行计划
A.先在备库上检查patch冲突
  在备库第一个节点上应用补丁
  在备库第二个节点上应用补丁
B.在主库上检查patch冲突
  在主库第一个节点上应用补丁
  在主库第二个节点上应用补丁
C.在主库上运行后续步骤

   cd $ORACLE_HOME/OPatch

   ./datapatch -verbose

检查补丁冲突
[root@ohs3 24448103]# /pgold/orgrid/oracle/product/121/OPatch/opatchauto apply -analyze
OPatchauto session is initiated at Tue Jan  3 11:21:20 2017
System initialization log file is /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchautodb/systemconfig2017-01-03_11-22-14AM.log.
Session log file is /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/opatchauto2017-01-03_11-22-35AM.log
The id for this session is 69JB

Executing OPatch prereq operations to verify patch applicability on home /pgold/ordb/oracle/product/121

Executing OPatch prereq operations to verify patch applicability on home /pgold/orgrid/oracle/product/121
Patch applicablity verified successfully on home /pgold/ordb/oracle/product/121

Patch applicablity verified successfully on home /pgold/orgrid/oracle/product/121

Verifying patch inventory on home /pgold/ordb/oracle/product/121

Verifying patch inventory on home /pgold/orgrid/oracle/product/121
Patch inventory verified successfully on home /pgold/ordb/oracle/product/121

Patch inventory verified successfully on home /pgold/orgrid/oracle/product/121
Verifying SQL patch applicablity on home /pgold/ordb/oracle/product/121

Following step failed during analysis:
 /bin/sh -c 'ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=stdby1 /pgold/ordb/oracle/product/121/OPatch/datapatch -prereq'

SQL patch applicablity verified successfully on home /pgold/ordb/oracle/product/121

OPatchAuto successful.

--------------------------------Summary--------------------------------

Analysis for applying patches has completed successfully:

Host:ohs3
RAC Home:/pgold/ordb/oracle/product/121

==Following patches were SKIPPED:

Patch: /mnt/24448103/21436941
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /mnt/24448103/24007012
Reason: This patch is not applicable to this specified target type - "rac_database"

==Following patches were SUCCESSFULLY analyzed to be applied:

Patch: /mnt/24448103/24340679
Log: /pgold/ordb/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-03_11-22-53AM_1.log

Patch: /mnt/24448103/24846605
Log: /pgold/ordb/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-03_11-22-53AM_1.log

Host:ohs3
CRS Home:/pgold/orgrid/oracle/product/121

==Following patches were SUCCESSFULLY analyzed to be applied:

Patch: /mnt/24448103/21436941
Log: /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-03_11-22-53AM_1.log

Patch: /mnt/24448103/24007012
Log: /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-03_11-22-53AM_1.log

Patch: /mnt/24448103/24340679
Log: /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-03_11-22-53AM_1.log

Patch: /mnt/24448103/24846605
Log: /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-03_11-22-53AM_1.log

OPatchauto session completed at Tue Jan  3 11:28:56 2017
Time taken to complete the session 7 minutes, 37 seconds
[root@ohs3 24448103]#
使用opatchauto应用补丁
[root@ohs3 24448103]# /pgold/orgrid/oracle/product/121/OPatch/opatchauto apply
OPatchauto session is initiated at Tue Jan  3 11:41:35 2017
System initialization log file is /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchautodb/systemconfig2017-01-03_11-42-33AM.log.
Session log file is /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/opatchauto2017-01-03_11-42-53AM.log
The id for this session is 252Q

Executing OPatch prereq operations to verify patch applicability on home /pgold/ordb/oracle/product/121

Executing OPatch prereq operations to verify patch applicability on home /pgold/orgrid/oracle/product/121
Patch applicablity verified successfully on home /pgold/ordb/oracle/product/121

Patch applicablity verified successfully on home /pgold/orgrid/oracle/product/121

Verifying patch inventory on home /pgold/ordb/oracle/product/121

Verifying patch inventory on home /pgold/orgrid/oracle/product/121
Patch inventory verified successfully on home /pgold/ordb/oracle/product/121

Patch inventory verified successfully on home /pgold/orgrid/oracle/product/121

Verifying SQL patch applicablity on home /pgold/ordb/oracle/product/121
"/bin/sh -c 'ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=stdby1 /pgold/ordb/oracle/product/121/OPatch/datapatch -prereq'" command failed with errors. Please refer to logs for more details. SQL changes, if any, can be analyzed by manually retrying the same command.

SQL patch applicablity verified successfully on home /pgold/ordb/oracle/product/121

Preparing to bring down database service on home /pgold/ordb/oracle/product/121
Successfully prepared home /pgold/ordb/oracle/product/121 to bring down database service

Bringing down CRS service on home /pgold/orgrid/oracle/product/121
Prepatch operation log file location: /pgold/orgrid/oracle/product/121/cfgtoollogs/crsconfig/crspatch_ohs3_2017-01-03_11-49-37AM.log
CRS service brought down successfully on home /pgold/orgrid/oracle/product/121

Performing prepatch operation on home /pgold/ordb/oracle/product/121
Perpatch operation completed successfully on home /pgold/ordb/oracle/product/121

Start applying binary patch on home /pgold/ordb/oracle/product/121
Binary patch applied successfully on home /pgold/ordb/oracle/product/121

Performing postpatch operation on home /pgold/ordb/oracle/product/121
Postpatch operation completed successfully on home /pgold/ordb/oracle/product/121

Start applying binary patch on home /pgold/orgrid/oracle/product/121
Binary patch applied successfully on home /pgold/orgrid/oracle/product/121

Starting CRS service on home /pgold/orgrid/oracle/product/121
Postpatch operation log file location: /pgold/orgrid/oracle/product/121/cfgtoollogs/crsconfig/crspatch_ohs3_2017-01-03_12-08-17AM.log
CRS service started successfully on home /pgold/orgrid/oracle/product/121

Preparing home /pgold/ordb/oracle/product/121 after database service restarted
No step execution required.........
Prepared home /pgold/ordb/oracle/product/121 successfully after database service restarted

Trying to apply SQL patch on home /pgold/ordb/oracle/product/121
"/bin/sh -c 'ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=stdby1 /pgold/ordb/oracle/product/121/OPatch/datapatch'" command failed with errors. Please refer to logs for more details. SQL changes, if any, can be applied by manually retrying the same command.

SQL patch applied successfully on home /pgold/ordb/oracle/product/121

Verifying patches applied on home /pgold/orgrid/oracle/product/121
Patch verification completed with warning on home /pgold/orgrid/oracle/product/121

Verifying patches applied on home /pgold/ordb/oracle/product/121
Patch verification completed with warning on home /pgold/ordb/oracle/product/121

OPatchAuto successful.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:ohs3
RAC Home:/pgold/ordb/oracle/product/121
Summary:

==Following patches were SKIPPED:

Patch: /mnt/24448103/21436941
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /mnt/24448103/24007012
Reason: This patch is not applicable to this specified target type - "rac_database"
==Following patches were SUCCESSFULLY applied:

Patch: /mnt/24448103/24340679
Log: /pgold/ordb/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-03_11-50-46AM_1.log

Patch: /mnt/24448103/24846605
Log: /pgold/ordb/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-03_11-50-46AM_1.log

Host:ohs3
CRS Home:/pgold/orgrid/oracle/product/121
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /mnt/24448103/21436941
Log: /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-03_11-56-51AM_1.log

Patch: /mnt/24448103/24007012
Log: /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-03_11-56-51AM_1.log

Patch: /mnt/24448103/24340679
Log: /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-03_11-56-51AM_1.log

Patch: /mnt/24448103/24846605
Log: /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-03_11-56-51AM_1.log

OPatchauto session completed at Tue Jan  3 12:20:56 2017
Time taken to complete the session 39 minutes, 22 seconds
[root@ohs3 24448103]# 
查看patch信息
[orgrid@ohs3 OPatch]$ ./opatch lsinv
Oracle Interim Patch Installer version 12.2.0.1.8
Copyright (c) 2017, Oracle Corporation.  All rights reserved.
Oracle Home       : /pgold/orgrid/oracle/product/121
Central Inventory : /pgold/oraInventory
   from           : /pgold/orgrid/oracle/product/121/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
Log file location : /pgold/orgrid/oracle/product/121/cfgtoollogs/opatch/opatch2017-01-03_12-15-34PM_1.log

Lsinventory Output file location : /pgold/orgrid/oracle/product/121/cfgtoollogs/opatch/lsinv/lsinventory2017-01-03_12-15-34PM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: ohs3.ohsdba.cn
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Grid Infrastructure 12c                                       12.1.0.2.0
There are 1 products installed in this Oracle Home.
Interim patches (4) :

Patch  24846605     : applied on Tue Jan 03 12:08:11 EST 2017
Unique Patch ID:  20676860
Patch description:  "OCW Interim patch for 24846605"
   Created on 14 Oct 2016, 04:57:57 hrs PST8PDT
   Bugs fixed:
     21339083, 18589889, 20768643, 19061429, 19133945, 19341538, 19521169
     20011424, 19361757, 19187207, 19302350, 19130141, 19530755, 19699720
     19620918, 19168690, 18899171, 19244316, 19653795, 18634372, 19471722
     19536337, 19184188, 19131709, 20160490, 20995001, 21131037, 19380733
     20985167, 18943696, 20552947, 19591984, 18135723, 18461246, 20014326
     19524857, 18890943, 19154753, 19499021, 19046190, 20923930, 20028666
     19051385, 19050688, 19682695, 19831611, 21607972, 18922918, 21087799
     18956780, 19683886, 23757020, 19026993, 20110156, 21269977, 18261648
     18362971, 19558324, 22651583, 20185476, 18882642, 19478119, 19414274
     17447588, 19262534, 20752167, 19147513, 22475834, 21242118, 19514085
     20758997, 19659885, 19319904, 18703978, 23079844, 19700256, 19703246
     20467806, 19192901, 21527118, 19479503, 19147751, 18901356, 21232394
     18964974, 22162062, 18835366, 19013789, 19207286, 18950232, 22583325
     19148791, 19556820, 16505171, 21210985, 22261732, 22135419, 19449737
     21878613, 21646169, 19187515, 19230771, 20795241, 19453778, 19853036
     18843572, 18520351, 21430567, 19185148, 19232454, 21220597, 18541110
     18834955, 19204743, 20175174, 19140891, 18747335, 20676340, 19270660
     19325701, 20877003, 19222693, 19662663, 19684131, 19010177, 19272663
     18910576, 18907170, 19426384, 9372680, 20737462, 19700294, 23640904
     20289828, 19331454, 22568500, 20278216, 20827053, 20119857, 19703199
     22456393, 20588164, 18955644, 20991879, 18508710, 19908346, 19589221
     18952857, 19537762, 21152052, 16286734, 20669114, 18762843, 18945249
     19184799, 21692274, 19205086, 19351363, 20091753, 19031737, 19079087
     19148367, 18968981, 19150517, 20231741, 19217019, 18730096, 18975620
     19067804, 21259359, 19054979, 19209951, 19318983, 18747382, 19154673
     18752378, 22905714, 19150088, 19013444, 19234177, 18999857, 19075747
     19367276, 19612597, 19874047, 19677813, 23049292, 19427050, 18910443
     20033787, 19148982, 19777496, 20730170, 18523468, 19277814, 20562133
     19071526, 21420753, 18850051, 20433932, 20061168, 19370739, 20822591
     19609388, 18776786, 20136892, 18989446, 19148793, 19585454, 18317489
     19955755, 19059053, 19807548, 19124972, 22229116, 18910748, 19147509
     18849896, 19617592, 19398098, 22840085, 19076165, 19498411, 19704993
     21294273, 19459023, 20634511, 21229744, 21474380, 21484367, 20276459
     17208793, 19234907, 19538714, 22867050, 19383028, 19513969, 22195657
     23111368, 19986391, 19314048, 18834934, 19473851, 19458082, 18894342
     19522067, 18116578, 19241857, 19076778, 19066699, 19068003, 18937186
     20267877, 19916737, 19770543, 22863466, 19635215, 19613533, 21057239
     20783416, 19315522, 19141785, 19163887, 19885321, 18715868, 18852058
     19701617, 19280860, 19139608, 21453435, 18946768, 19135521, 18604143
     19627476, 20568884, 20317221, 20177779, 19266658, 24522717, 18330979
     19027351, 21227730, 18707416, 21118157, 21113068, 19925992, 20235486
     20006646, 15922206, 18439295, 18991776, 21245437, 23170839, 19163425
     19550195, 18849021, 18861196, 17940721, 18524834, 19287706, 19522313
     18835283, 18748932, 19184765, 21639478, 14851828, 20598625, 19226141
     19053891, 18871287, 18998228, 18980002, 19682778, 19325604, 18777835
     17338864, 18945906, 19513650, 19702758, 18952577, 19473088, 19178517
     18729269, 19529729, 19455563, 20877072, 23275930, 20340620, 18536826
     19292605, 22264951, 20920711, 20660273, 20011635, 17592037, 18935857
     22989069, 19029647, 19179158, 22302421, 23076471, 19140712, 20012766
     23049301, 19184276, 20510208, 20001507, 20079414, 19680763, 19259765
     18962892, 19513888, 14661880, 21519340, 21222147, 20218012, 19551830
     21616278, 19068333, 18945435, 20775015, 19319192, 20839581, 19178629
     21694237, 19304104, 19284357, 22594310, 20725084, 19457575, 21297657
     19069755, 19021575, 18715884, 19584688, 18798573, 19812592, 19018001
     19292272, 19270956, 21967791, 21794779, 23055224, 18700893, 21276514
     20467377, 18406774, 20607821, 21976167, 21082737, 21694632, 20115586
     20883009, 19164099, 18283792, 19155350, 19884033, 19146822, 18798432
     21123424, 19471836, 20936562, 18750781, 19045143, 22483804, 19146980
     19601003, 20099624, 21378016, 19537547, 19281106, 18862203, 19954372
     18235274, 19205617, 19513351, 20219458, 19150313, 18843054, 18708349
     19332386, 18953639, 21423055, 19371270, 19203996, 20038431, 19370846
     21053036, 18998379, 20157569, 21357522, 19273577, 24667931, 24709351
     22113170, 19632437, 18990354, 19288396, 20620581, 19557558, 19127078
     21792881, 20900588, 20053557, 22088198, 22664609, 19315567, 19444471
     19154933, 20953798, 18290252, 18813323, 19915945, 19500293, 18643483
     19134098, 23034352, 18965694, 19226858, 19591356, 19602208, 22884308
     20069197, 18417590, 18920408, 18636884, 22289350, 19043795, 20746507
     18260170, 18919682, 18678829, 19319357, 19273758, 18953878, 18999195
     18759724, 19066844, 13843841, 20290467, 22934855, 19649640, 19062675
     21924910, 18859710, 20862812, 19504641, 23101611, 19341481, 20293730
     19343245, 18304090, 19241655, 19470791, 18242738, 20649573, 18372060
     18953889, 18827679, 19140711, 19023430, 19259290, 19045388, 20186278
     19522571, 19709663, 18875012, 18861564, 19273760, 19225265, 15885689
     20853464, 21696068, 18819158, 21394146, 19049721, 19368917, 21255373
     22393909, 20408163, 20579351, 18868829, 20350915, 21327402, 22024217
     23101338, 19820247, 20363708, 19538241, 19804032

Patch  24340679     : applied on Tue Jan 03 12:04:44 EST 2017
Unique Patch ID:  20713212
Patch description:  "DATABASE BUNDLE PATCH: 12.1.0.2.161018 (24340679)"
   Created on 3 Oct 2016, 08:45:59 hrs PST8PDT
Sub-patch  23144544; "DATABASE BUNDLE PATCH: 12.1.0.2.160719 (23144544)"
Sub-patch  22806133; "DATABASE BUNDLE PATCH: 12.1.0.2.160419 (22806133)"
Sub-patch  21949015; "DATABASE BUNDLE PATCH: 12.1.0.2.160119 (21949015)"
Sub-patch  21694919; "DATABASE BUNDLE PATCH: 12.1.0.2.13 (21694919)"
Sub-patch  21527488; "DATABASE BUNDLE PATCH: 12.1.0.2.12 (21527488)"
Sub-patch  21359749; "DATABASE BUNDLE PATCH: 12.1.0.2.11 (21359749)"
Sub-patch  21125181; "DATABASE BUNDLE PATCH: 12.1.0.2.10 (21125181)"
Sub-patch  20950328; "DATABASE BUNDLE PATCH: 12.1.0.2.9 (20950328)"
Sub-patch  20788771; "DATABASE BUNDLE PATCH: 12.1.0.2.8 (20788771)"
Sub-patch  20594149; "DATABASE BUNDLE PATCH: 12.1.0.2.7 (20594149)"
Sub-patch  20415006; "DATABASE BUNDLE PATCH: 12.1.0.2.6 (20415006)"
Sub-patch  20243804; "DATABASE BUNDLE PATCH: 12.1.0.2.5 (20243804)"
   Bugs fixed:
     17551261, 19215966, 18689530, 19215968, 22569317, 21293693, 18257176
     22083366, 23248603, 19410056, 22233968, 19791273, 19441649, 20131617
     19243521, 19238590, 21281532, 24577566, 19410553, 19662976, 21330561
     19134173, 23209741, 19512155, 14254610, 20322560, 21547079, 17551063
     22507210, 20994184, 13787015, 16010876, 18463035, 18829196, 19183813
     19001390, 23310662, 21459225, 19358317, 19376952, 20917841, 23037377
     20593729, 20227126, 20724902, 19906611, 18940497, 18948177, 21877749
     19035573, 19176326, 19359219, 18942489, 20011897, 20413820, 19189240
     20243804, 22077553, 19542737, 19477176, 21087813, 19982584, 19875836
     20904530, 19074147, 19347744, 18411216, 22258530, 22507234, 21330334
     23323592, 18966843, 21445204, 19264279, 19212061, 22094845, 22094844
     19183834, 20250735, 18859658, 19468991, 19364018, 20824172, 16938780
     19391024, 19910254, 18418934, 22514212, 19402853, 19310488, 20618595
     23200778, 19265346, 20001738, 19146778, 21123913, 18369237, 21787056
     21365452, 19068610, 20984916, 20557652, 19348649, 22178855, 22173980
     16777441, 20048359, 20011646, 21517767, 19769625, 20952633, 19192508
     20249656, 23265829, 19381346, 18877780, 18684802, 21283023, 20700049
     19632217, 20603378, 19001359, 21093564, 20658124, 21387964, 19970163
     17532734, 19563433, 18849970, 20627866, 20844426, 19899243, 19811763
     19186845, 21188532, 18791688, 21442094, 20890311, 21151241, 18728991
     19403858, 21296029, 20988771, 20063894, 18953292, 20176045, 18963099
     19031341, 20936905, 21218243, 20235511, 21220620, 18938517, 20801783
     19243313, 19271894, 21517261, 21249747, 21153266, 19409212, 20675854
     22657942, 19890034, 20657441, 18996066, 20024405, 20466322, 18740837
     19525002, 19662635, 20018770, 22304421, 19021645, 19159710, 22194927
     19065556, 21651772, 18968507, 18996056, 21868720, 19524384, 17722075
     19200481, 20033247, 18907688, 20328205, 20313052, 19693124, 19446007
     18952989, 19043177, 19029674, 20704530, 19928926, 18999568, 21629064
     20161701, 23007241, 18760601, 19542097, 24386767, 18520414, 19931709
     20394750, 19006817, 20732272, 20536378, 22153180, 20828104, 21305617
     20024112, 19188927, 19995675, 20074391, 20565133, 19536017, 19191274
     14643995, 22540743, 20794951, 21079201, 20832474, 19824871, 20355900
     20397490, 19666651, 19686260, 18900917, 19582642, 19174430, 19184226
     19954575, 20144871, 19536415, 19220183, 19171086, 19353144, 19175732
     20426193, 19195409, 18764866, 22168163, 19335438, 20106567, 19144692
     21427131, 20447445, 19881042, 18856999, 21793604, 19899833, 20565112
     19124336, 17890099, 19910052, 18990023, 21300341, 20848335, 21744290
     20897759, 22734038, 19482919, 20637701, 19052488, 20543011, 19562381
     20032123, 20328248, 18497527, 24365589, 22865673, 21812537, 22220568
     20798891, 18743542, 18603592, 20347562, 20063230, 18764841, 18735746
     20049681, 22191356, 20595686, 19687159, 22664402, 20313024, 20424899
     19945499, 19302393, 19886165, 21899588, 21476308, 20754928, 20354411
     24297898, 24308635, 20390564, 18430870, 19240456, 22815955, 19354794
     22492474, 22347483, 20603181, 20881450, 21827522, 19289499, 18952766
     21273804, 20082651, 23125826, 20226038, 18043064, 20591915, 21559748
     22062026, 19647503, 20475845, 17274537, 21180173, 20897180, 19787571
     19143193, 19440586, 22374754, 17319928, 18895170, 19440386, 20708701
     19483288, 16439813, 20716291, 21121136, 19240264, 20328279, 20859910
     19393542, 20624914, 22024071, 21847223, 19075256, 19065222, 21174395
     19280225, 19793397, 19440520, 20560611, 19248799, 21756699, 22053453
     20165291, 19504946, 19605498, 20232621, 21665955, 20373598, 20476175
     20070112, 18900245, 20711718, 19139189, 18911956, 19240996, 19238815
     20611795, 19664340, 23215145, 19523462, 19773811, 21680130, 19188683
     19250261, 19843202, 18594569, 19817284, 19288324, 22528741, 19212370
     20003240, 20009569, 18917800, 21774511, 19989904, 19248279, 19327067
     21286665, 19315691, 21058333, 19547013, 18834993, 23072137, 18816732
     21186638, 19768226, 20960011, 20279368, 19541796, 17867700, 20023092
     19588097, 23528412, 18966425, 20201112, 20617709, 19532017, 20300454
     19192487, 19818513, 19879445, 20830993, 22353346, 19049932, 16941434
     18748005, 20040448, 20181155, 20361671, 21214994, 19495405, 19571082
     21813529, 20009833, 19682726, 16556115, 21976960, 20294666, 22068270
     18120963, 8899370, 19195895, 20043616, 18914624, 19824028, 20857041
     22348206, 23718355, 21378561, 19460920, 20958816, 19295348, 21291274
     19174521, 19520602, 21875360, 19326908, 19440105, 20093776, 22841860
     19647567, 21610048, 19019270, 19230722, 19147636, 21246723, 21308727
     20074466, 20192960, 19066316, 19627012, 19546825, 20847534, 14283239
     20001362, 19701015, 21839477, 18610915, 20697178, 18674024, 20494924
     20930092, 20653340, 18306996, 19591408, 20013559, 19151370, 19524158
     19915271, 17285555, 21950301, 20284155, 18856106, 20950386, 20903906
     19680898, 21533640, 19886365, 20146809, 19878169, 21080143, 19163723
     22359063, 23508801, 19927393, 18868195, 21756677, 21430035, 19607219
     20707790, 19632912, 20668053, 22353199, 18971927, 19907473, 18897633
     19034201, 21060755, 22916353, 21756661, 21136435, 20985069, 19028800
     19649808, 21555019, 19077215, 20686773, 20027746, 21421886, 19884571
     19262199, 22347859, 19540171, 22376809, 22346829, 19048007, 18647293
     19689979, 17409174, 19566592, 14705949, 20133026, 19609438, 20005124
     22821774, 20496254, 20233181, 19902195, 19168167, 20318889, 20287585
     19012119, 19480309, 19485593, 13683743, 19060015, 19131386, 19051205
     21632821, 19512341, 19841800, 21164840, 19818721, 20800890, 19587324
     19140924, 24316947, 18802876, 21646361, 19578350, 19637186, 23749454
     19537845, 19854717, 19509565, 18674047, 19054077, 20808265, 19708632
     19988852, 20898997, 20557750, 21091431, 19289642, 23263018, 20869721
     20978173, 20177858, 20139836, 19024388, 19624452, 22140382, 20233159
     18952331, 21373473, 20071054, 18944562, 20421900, 20752907, 22734547
     22074084, 18899662, 23088803, 19878106, 19978542, 19329654, 19448499
     17972478, 21517440, 21915719, 21534893, 21516425, 19076343, 20672955
     20451844, 19571055, 19990037, 20703629, 19811709, 18909599, 19526750
     22460450, 18642040, 19230595, 18250893, 17670355, 19858928, 19576559
     19146597, 17414008, 19783286, 20441797, 20704450, 22641033, 19705781
     22338374, 20777159, 19614585, 21897746, 20020936, 19157754, 18663279
     18868646, 20320834, 22966117, 19494323, 18787718, 21221860, 19230581
     20673810, 15894842, 19907278, 19168395, 18893947, 21450666, 19350952
     22223463, 18417036, 16923858, 18378632, 20028247, 18115378, 20919320
     20474192, 19161450, 22046677, 19347458, 19192570, 19385656, 20920911
     21315084, 18122373, 19598441, 16817656, 20808220, 23644359, 19617921
     20667450, 19606174, 21293453, 18436647, 19843631, 19597583, 18499088
     18889867, 19723273, 19232702, 21607719, 19798240, 21099555, 21174504
     22175564, 20577490, 19141838, 20842388, 19795047, 18727933, 20117253
     19865345, 19989661, 20962057, 18813860, 19540182, 19784751, 20951038
     20545234, 19908836, 21184223, 20936447, 20739811, 19187708, 21848185
     17994602, 22882992, 20082778, 20563314, 20387265, 18739883, 18971325
     22212940, 19149990, 21263635, 20534663, 19513298, 18886413, 22160989
     19728268, 20010996, 22519146, 21275387, 19555029, 19366375, 19703301
     20717091, 20216232, 20949664, 18665091, 18202441, 20267166, 20828433
     20005796, 24844019, 19706965, 19068970, 18549238, 22148226, 19153897
     18511269, 18797519, 20333204, 19173409, 20825533, 19015671, 19025195
     19638998, 19649152, 19670108, 19855835, 20815650, 20087383, 18964978
     20480623, 20534497, 19512276, 20969164, 20099675, 20707932, 19819141
     19176223, 19014915, 19152115, 20134339, 20213973, 20144042, 19341709
     20868862, 19468612, 21322887, 20425790, 19170047, 21329301, 19468890
     22351417, 16739157, 19333670, 20124446, 19883092, 19548688, 22302666
     19548064, 19529953, 20075921, 19347898, 18510194, 19658708, 22501616
     19591608, 20276452, 19051985, 19563300, 22066671, 24587802, 20186868
     22380919, 19971335, 21266085, 17835294, 19721304, 19791377, 19547774
     19176241, 20746251, 21896069, 20746044, 19185876, 20898391, 19192600
     20907061, 19433200, 20281121, 20159216, 21281607, 6599380, 19577410
     19527817, 21117640, 22092979, 19516448, 22761738, 21116398, 20366825
     19566974, 19653712, 19277787, 19341239, 19490948, 19931367, 18890834
     19330795, 20832516, 19309466, 19377346, 19394032, 19081128, 19509982
     20026982, 20011515, 22675506, 19631051, 20596234, 19054378, 20368850
     19594959, 18973548, 20938019, 20392464, 19303936, 22235858, 19943771
     20900013, 21479753, 19461270, 19696041, 16875041, 18964939, 20241083
     19430401, 19403942, 22296366, 22529018, 19879746, 20496341, 19684504
     19585708, 19024808, 20528052, 19076106, 20977794, 20130826, 18799993
     19987300, 22717225, 18701619, 16087033, 19262984, 19544707, 20228093
     20212067, 20195148, 18897147, 18758877, 19583624, 22268833, 19488514
     23235386, 19148478, 20887355, 19147016, 20679868, 20446883, 20125550
     18847357, 16870214, 19835133, 20005313, 19871910, 20466628, 19317899
     20072221, 20019581, 19162308, 19730508, 22347934, 18819908, 19327391
     20250147, 23124895, 20381311, 22653923, 18421248, 20265853, 20001466
     20356733, 18508040, 23115408, 19566012, 22901797, 19547370, 19065677
     20148087, 19271943, 19799847, 21960504, 21225209, 19352437, 23315889
     19264172, 18022774, 18967382, 18942923, 19029552, 19582781, 19900800
     21241829, 19906564, 18678808, 20310880, 22086638, 19136936, 20468223
     21132297, 18424767, 21553476, 19973780, 22465352, 18938454, 18648423
     21419192, 18962266, 19869255, 20471920, 22051945, 20256086, 21620471
     19074086, 21279842, 18127250, 23271423, 18990693, 19131607, 19914604
     21554789, 21372897, 20101006, 21241052, 18867241, 21668627, 22091036
     19304354, 20794034, 22528955, 23025340, 19883038, 20106456, 23260854
     18681056, 22837524, 20952966, 19896336, 20828947, 23132311, 24329056
     20296619, 18618122, 20440930, 18456643, 19699191, 23065323, 19294529
     19201867, 18687101, 23294548, 19698567, 22551446, 19777862, 18441401
     20266282, 21373076, 19174942, 19803231, 20126138, 20130196, 19627721
     18899974, 19680455, 19383247, 21079172, 20598042, 20841419, 19645496
     19058490, 19032777, 20781373, 19399918, 20540694, 22184431, 19434529
     19018447, 18051556, 22757364, 19212166, 19317646, 18851894, 21136799
     19166028, 19022470, 22251691, 19284031, 18112769, 20173897, 19791702
     19536132, 19649591, 21372880, 18687126, 20105469, 19880190, 22220445
     19871282, 19345973, 18952631, 16887946, 19537328, 20401975, 14165431
     17655240, 19189762, 19805359, 23093845, 19155797, 23782881, 22374347
     19933147, 19196832, 17210525, 20747533, 18663314, 20061399, 24402551
     19189525, 21649497, 20334691, 22762046, 22075064, 20245173, 18845653
     20801390, 18798250, 18988834, 19647120, 8889083, 18921743, 20052269
     21345404, 20245930, 18954112, 14043712, 18799063, 19331728, 19571367
     20096277, 18753782, 20925795, 19233039, 19018206, 20509482, 15996428
     20588502, 20884085, 18679653, 18849537, 23501901, 18907741, 19183343
     19859472, 21917884, 19571350, 19189317, 19982551, 22190791, 19644859
     22228997, 19274987, 19390567, 20340510, 19279273, 20586677, 20669434
     19175750, 16863642, 18778801, 19130152, 19619732, 20927568, 20348653
     18607546, 19680796, 23507063, 22129399, 19277336, 20766694, 19676905
     20165574, 19475862, 20096843, 20558005, 20020274, 20734332, 20922010
     20217875, 20123899, 19450314, 19318409, 19222052, 18881811, 20184217
     20246939, 21157175, 19188385, 19250184, 22366558, 21028698, 18191823
     19307662, 19371175, 20261923, 19154375, 20322037, 21977392, 19336395
     16293223, 20261926, 20139391, 20819901, 19891196, 19382851, 19676012
     23602960, 20081206, 20217801, 18840932, 19851608, 21097043, 20003739
     19354542, 21665897, 19929706, 19148107, 18900107, 19143550, 22926613
     19982314, 20428621, 20609727, 18300729, 18775971, 19138800, 21315800
     19882506, 20177577, 19175543, 20321129, 18533573, 19518079, 21350832
     21549434, 20617820, 20539160, 18908550, 19272047, 23480973, 19645930
     19145675, 20548731, 20122715, 22366322, 20721341, 20656178, 19364502
     20017509, 18967466, 19363645, 19597439, 21239530, 19230607, 17734040
     20070689, 23108128, 20088905, 20880215, 19888853, 19534363, 19354335
     15931756, 19044962, 19162085, 19478966, 19639483, 21068213, 19889230
     17158137, 20596195, 19475148, 18818841, 20194605, 19513406, 21239922
     22243719, 17249267, 19563715, 20378086, 21260431, 20723042, 19301392
     22923409, 20877664, 21059919, 20185943, 20672075, 20879889, 20451063
     21903230, 19298213, 19723336, 19146626, 19120604, 19604659, 21285458
     19150533, 21032832, 18288842, 19308965, 19566293, 19959229, 18803726
     18783224, 18934048, 20241212, 21526048, 19624139, 19197175, 19191037
     19180770, 20128644, 23749547, 19952975, 19590877, 19004100, 23324000
     20664416, 20340595, 19013183, 21187090, 19688599, 19576659, 24378358
     19912337, 20464614, 20445031, 19438874, 19067244, 19953052, 20564072
     19200977, 19682278, 22255113, 18622436, 21568648, 20331945, 20893843
     19461428, 22030856, 19263008, 19825394, 16356176, 20051868, 18863094
     22778199, 19190401, 19168442, 18749211, 19810774, 19624156, 19727038
     21218121, 19056729, 21550777, 19539945, 19573061, 22254139, 19899544
     20069788, 19191531, 21342045, 23736203, 19258504, 19881439, 19996677
     21391017, 17365043, 19817386, 19468347, 13846337, 16359751, 20027864
     19769480, 19439759, 19272708, 18810904, 22452178, 20230090, 20402832
     18494306, 19873610, 23229229, 17284345, 19518539, 13542050, 20064203
     21306811, 19698040, 20808192, 19291380, 22297022, 20225417, 19578230
     19447234, 19561643, 19487147, 19313563, 20831538, 18472224, 19016730
     19130972, 19693090, 16619249, 19362731, 18796543, 18354830, 20494044
     20217416, 21188584, 19989009, 22529088, 19932939, 20688221, 22075019
     22666009, 19969872, 19270287, 21131289, 19136799, 19932746, 20448066
     19990543, 19012044, 20214168, 14372604, 20209481, 18885870, 21785691
     21765742, 13640676, 18705806, 23134070, 22264489, 13498243, 20202880
     19894622, 19501299, 19131239, 20899461, 21387128, 20581111, 19146474
     19526873, 18673090, 22491079, 19023822, 20181016, 19178851, 19124589
     19578247, 19050649, 19181525, 20399973, 19585773

Patch  24007012     : applied on Tue Jan 03 12:00:35 EST 2017
Unique Patch ID:  20511653
Patch description:  "ACFS Patch Set Update : 12.1.0.2.161018 (24007012)"
   Created on 30 Aug 2016, 00:17:17 hrs PST8PDT
   Bugs fixed:
     19060056, 21369858, 19355146, 19690653, 19526234, 20952520, 19475588
     21231953, 18510745, 19149476, 19013966, 22222222, 19859183, 21519796
     19469788, 21555038, 18877486, 20438706, 19610022, 19335268, 21058846
     22472364, 22319558, 19183802, 19452723, 21124596, 19051391, 20010980
     19526283, 22198405, 22689989, 19279106, 19078259, 19644505, 21077218
     21233961, 19184398, 18321597, 19811784, 18185024, 22174238, 20098064
     19353057, 19502657, 22661787, 19434261, 18951113, 20140148, 18900953
     19053182, 22975177, 18955907, 18934139, 19134464, 19450090, 19517835
     22241945, 20923224, 19446719, 20402287, 19201087, 21208140, 19649858
     21076821, 19428756, 19001684, 19610001, 18899600, 20314907, 19509898
     19528981, 18957085, 19127216, 23557970, 19901825, 22810422, 18915417
     19270227, 22087780, 22198176, 19919907, 19593769, 23112252, 19557156
     19195735, 23252830, 22846612, 20681968, 18851012, 19844362

Patch  21436941     : applied on Tue Jan 03 11:57:14 EST 2017
Unique Patch ID:  19245012
Patch description:  "WLM Patch Set Update: 12.1.0.2.5 (21436941)"
   Created on 13 Aug 2015, 04:00:40 hrs PST8PDT
   Bugs fixed:
     20075154, 20641027, 20548410, 19016964, 19582630

Patch level status of Cluster nodes :

 Patching Level                  Nodes
 --------------                  -----
 0                               ohs4
 3207372977                      ohs3
--------------------------------------------------------------------------------
OPatch succeeded.
[orgrid@ohs3 OPatch]$
注意:此时,只在ohs3上应用了该补丁,使用opatch lsinv显示的是上面的内容

opatchauto resume

当应用补丁出问题,解决问题后,可以使用该命令继续之前的步骤

[root@ohs1 24448103]#  /pgold/orgrid/oracle/product/121/OPatch/opatchauto resume

OPatchauto session is initiated at Wed Jan  4 09:02:05 2017
Session log file is /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/opatchauto2017-01-04_09-02-06AM.log
Resuming existing session with id M2JD

Bringing down CRS service on home /pgold/orgrid/oracle/product/121
Prepatch operation log file location: /pgold/orgrid/oracle/product/121/cfgtoollogs/crsconfig/crspatch_ohs1_2017-01-04_09-02-16AM.log
CRS service brought down successfully on home /pgold/orgrid/oracle/product/121

Performing prepatch operation on home /pgold/ordb/oracle/product/121
Perpatch operation completed successfully on home /pgold/ordb/oracle/product/121

Start applying binary patch on home /pgold/ordb/oracle/product/121
Binary patch applied successfully on home /pgold/ordb/oracle/product/121


Performing postpatch operation on home /pgold/ordb/oracle/product/121
Postpatch operation completed successfully on home /pgold/ordb/oracle/product/121


Start applying binary patch on home /pgold/orgrid/oracle/product/121
Binary patch applied successfully on home /pgold/orgrid/oracle/product/121

Starting CRS service on home /pgold/orgrid/oracle/product/121
Postpatch operation log file location: /pgold/orgrid/oracle/product/121/cfgtoollogs/crsconfig/crspatch_ohs1_2017-01-04_09-22-04AM.log
CRS service started successfully on home /pgold/orgrid/oracle/product/121


Preparing home /pgold/ordb/oracle/product/121 after database service restarted
No step execution required.........
Prepared home /pgold/ordb/oracle/product/121 successfully after database service restarted


Trying to apply SQL patch on home /pgold/ordb/oracle/product/121
SQL patch applied successfully on home /pgold/ordb/oracle/product/121


Verifying patches applied on home /pgold/orgrid/oracle/product/121
Patch verification completed with warning on home /pgold/orgrid/oracle/product/121


Verifying patches applied on home /pgold/ordb/oracle/product/121
Patch verification completed with warning on home /pgold/ordb/oracle/product/121

OPatchAuto successful.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:ohs1
RAC Home:/pgold/ordb/oracle/product/121
Summary:

==Following patches were SKIPPED:

Patch: /mnt/24448103/21436941
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /mnt/24448103/24007012
Reason: This patch is not applicable to this specified target type - "rac_database"

==Following patches were SUCCESSFULLY applied:

Patch: /mnt/24448103/24340679
Log: /pgold/ordb/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-04_09-03-34AM_1.log

Patch: /mnt/24448103/24846605
Log: /pgold/ordb/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-04_09-03-34AM_1.log

Host:ohs1
CRS Home:/pgold/orgrid/oracle/product/121
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /mnt/24448103/21436941
Log: /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-04_09-10-06AM_1.log

Patch: /mnt/24448103/24007012
Log: /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-04_09-10-06AM_1.log

Patch: /mnt/24448103/24340679
Log: /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-04_09-10-06AM_1.log

Patch: /mnt/24448103/24846605
Log: /pgold/orgrid/oracle/product/121/cfgtoollogs/opatchauto/core/opatch/opatch2017-01-04_09-10-06AM_1.log

OPatchauto session completed at Wed Jan  4 09:39:34 2017
Time taken to complete the session 37 minutes, 29 seconds
[root@ohs1 24448103]#
最终patch信息
[orgrid@ohs1 ~]$ /pgold/orgrid/oracle/product/121/OPatch/opatch lsinv|tail
Patch level status of Cluster nodes :

 Patching Level                  Nodes
 --------------                  -----
 3207372977                      ohs2,ohs1
--------------------------------------------------------------------------------
OPatch succeeded.
[orgrid@ohs1 ~]$ ssh ohs3 /pgold/orgrid/oracle/product/121/OPatch/opatch lsinv|tail
orgrid@ohs3's password:

Patch level status of Cluster nodes :

 Patching Level                  Nodes
 --------------                  -----
 3207372977                      ohs3,ohs4
--------------------------------------------------------------------------------
OPatch succeeded.
[orgrid@ohs1 ~]$

[oracle@ohs1 ~]$ /pgold/ordb/oracle/product/121/OPatch/opatch lsinv |egrep '^Patch|node'
Patch  24846605     : applied on Wed Jan 04 09:09:56 EST 2017
Patch description:  "OCW Interim patch for 24846605"
Patch  24340679     : applied on Wed Jan 04 09:08:40 EST 2017
Patch description:  "DATABASE BUNDLE PATCH: 12.1.0.2.161018 (24340679)"
Rac system comprising of multiple nodes
  Local node = ohs1
  Remote node = ohs2
[oracle@ohs1 ~]$ ssh ohs3 /pgold/ordb/oracle/product/121/OPatch/opatch lsinv |egrep '^Patch|node'
oracle@ohs3's password:
Patch  24846605     : applied on Tue Jan 03 11:56:42 EST 2017
Patch description:  "OCW Interim patch for 24846605"
Patch  24340679     : applied on Tue Jan 03 11:55:25 EST 2017
Patch description:  "DATABASE BUNDLE PATCH: 12.1.0.2.161018 (24340679)"
Rac system comprising of multiple nodes
  Local node = ohs3
  Remote node = ohs4
[oracle@ohs1 ~]$


运行datapatch

[oracle@ohs1 OPatch]$ ./datapatch -verbose
SQL Patching tool version 12.1.0.2.0 on Fri Jan  4 00:35:15 2017
Copyright (c) 2016, Oracle.  All rights reserved.

Log file for this invocation: /pgold/ordb/oracle/product/cfgtoollogs/sqlpatch/sqlpatch_20038_2017_01_04_00_35_15/sqlpatch_invocation.log

Connecting to database...OK
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of SQL patches:
Bundle series DBBP:
  ID 161018 in the binary registry and ID 161018 in the SQL registry

Adding patches to installation queue and performing prereq checks...
Installation queue:
  Nothing to roll back
  Nothing to apply

SQL Patching tool complete on Fri Jan  4 00:36:55 2017
[oracle@ohs1 OPatch]$

如果想同时应用多个补丁,可以使用phBaseDir参数,把补丁放在一个位置,通过下面命令应用

/u01/orgrid/oracle/product/122/OPatch/opatchauto apply -oh /u01/orgrid/oracle/product/122 -phBaseDir /tmp/phBaseDir


如果碰到下面的错误,请确认放patch的目录权限正确,可以通过chmod -R 775 <unzipped patch location>去修改

OPATCHAUTO-72043: Patch collection failed.
OPATCHAUTO-72043: Failed to create bundle patch object.
OPATCHAUTO-72043: Please verify the patch supplied.



Reference

https://docs.oracle.com/cd/E24628_01/doc.121/e39376/opatchauto_local.htm#OPTCH646

https://docs.oracle.com/cd/E24628_01/doc.121/e39376/configuration_patching.htm#OPTCH149



关键词:opatchauto oplan opatch patch 

相关文章

如何在oracle 12c中正确的应用补丁?
如何使用opatchauto应用补丁?
如何使用oplan?
How to Apply Oracle Database Patch?
Oracle数据库补丁的分类和用途
12c新特性-OPatch Automation Tool(opatchauto)
Oracle数据库PSU/SPU/Bundle Patch号的变化
Top