os: centos 7.4
db: oracle 12.1.0.2

oracle 12.1.0.2 开始提供了 DBBP 的升级方式(Database Proactive Bundle Patch),
DBBP的内容,包含了PSU的内容,也包含了SPU的内容。可以说是一个十全大补丸.
貌似现在是每季度发布一次.

  1. 决定打补丁方式,是PSU还DBBP(这很重要,具有战略意义)
  2. 升级opatch到最新版本(这一步都需要)
  3. opatchauto apply
  4. opatch lsinventory检查
  5. datapatch -verbose(之前是catch psu脚本)
  6. select * from dba_registry_sqlpatch(之前是dba_hist_registry)

版本

# uname -a
Linux node2 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

gi

# su - grid
$ sqlplus / as sysasm;SQL*Plus: Release 12.1.0.2.0 Production on Mon May 13 19:04:39 2019Copyright (c) 1982, 2014, Oracle.  All rights reserved.Connected.
SQL> 


需要仔细阅读这两个补丁的"自述文件",这是最全面的安装说明.

Patch 29176115 - Grid Infrastructure Patch Set Update 12.1.0.2.190416

OPatch Utility Information

所有节点各自都需要先备份旧的OPatch

# mv /u01/app/grid/product/12.1.0/grid_1/OPatch /u01/app/grid/product/12.1.0/OPatch.20190513
# su - grid
$ /u01/app/grid/product/12.1.0/OPatch.20190513/opatch version
OPatch Version: 12.1.0.1.3OPatch succeeded.

GI PSU 12.1.0.2.190416 要求的 OPatch 最低版本为 12.2.0.1.14 (You must use the OPatch utility version 12.2.0.1.14 or later to apply this patch.)
从 https://updates.oracle.com/download/6880880.html 下载OPatch 12.2.0.1.17

# rz
# ls -l
total 109068
-rw-r--r-- 1 grid oinstall 111682884 May 14  2019 p6880880_122010_Linux-x86-64.zip# unzip p6880880_122010_Linux-x86-64.zip -d /u01/app/grid/product/12.1.0/grid_1
# chown -R grid:oinstall /u01/app/grid/product/12.1.0/grid_1/OPatch
# su - grid
$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.17OPatch succeeded.

Validation of Oracle Inventory

# su - grid
$ $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME

Download and Unzip the Patch

所有节点各自操作

# su - grid
$ rz
$ ls -l
total 2546224
-rw-r--r-- 1 grid oinstall 2607330314 May  8 21:28 p29176115_121020_Linux-x86-64.zip$ unzip p29176115_121020_Linux-x86-64.zip
$ ls -l
total 2546224
drwxr-xr-x 7 grid oinstall        143 Apr  8 06:01 29176115
-rw-r--r-- 1 grid oinstall 2607330314 May  8 21:28 p29176115_121020_Linux-x86-64.zip

方式一 One-off Patch Conflict Detection and Resolution

The fastest and easiest way to determine whether you have one-off patches in the Oracle home that conflict with the patch, and to get the necessary conflict resolution patches, is to use the Patch Recommendations and Patch Plans features on the Patches & Updates tab in My Oracle Support. These features work in conjunction with the My Oracle Support Configuration Manager. Recorded training sessions on these features can be found in Document 603505.1.

However, if you are not using My Oracle Support Patch Plans, the My Oracle Support Conflict Checker tool enables you to upload an OPatch inventory and check the patches that you want to apply to your environment for conflicts.


for 12.1 GI home

# /u01/app/grid/product/12.1.0/grid_1/OPatch/opatchauto apply /home/grid/29176115 -analyze -oh /u01/app/grid/product/12.1.0/grid_1# /u01/app/grid/product/12.1.0/grid_1/OPatch/opatchauto rollback /home/grid/29176115 -analyze -oh /u01/app/grid/product/12.1.0/grid_1

for 12.1 DB homes

# /u01/app/oracle/product/12.1.0/db_1/OPatch/opatchauto apply /home/grid/29176115 -analyze -oh /u01/app/oracle/product/12.1.0/db_1# /u01/app/oracle/product/12.1.0/db_1/OPatch/opatchauto rollback /home/grid/29176115 -analyze -oh /u01/app/oracle/product/12.1.0/db_1

-analyze 表示检查

方式二 opatchauto

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, 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.

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

# export PATH=$PATH:/u01/app/grid/product/12.1.0/grid_1/OPatch
# which opatchauto

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

# opatchauto apply /home/grid/29176115

To patch only the GI home:

# opatchauto apply /home/grid/29176115 -oh /u01/app/grid/product/12.1.0/grid_1

To patch one or more Oracle RAC database homes:

# opatchauto apply /home/grid/29176115 -oh /u01/app/oracle/product/12.1.0/db_1

对应的 rollback 如下
To roll back the patch from the GI home and each Oracle RAC database home:

# opatchauto rollback /home/grid/29176115

To roll back the patch from the GI home:

# opatchauto rollback /home/grid/29176115 -oh /u01/app/grid/product/12.1.0/grid_1

To roll back the patch from the Oracle RAC database home:

# opatchauto rollback /home/grid/29176115 -oh /u01/app/oracle/product/12.1.0/db_1

opatchauto apply 期间会关掉运行节点的 rdbms 实例及 asm 实例,如果是rac数据库,则完全由另外一个节点提供服务.

一定要确保 opatchauto apply 的日志输出显示是成功的.

一个节点 opatchauto apply 成功后再在另外一个节点执行 opatchauto apply 操作.

检查

# ps -fu grid
# ps -fu oracle

opatchauto apply 后会自动启动 启动 gi 和 rac 数据库.

# su - grid
$ $ORACLE_HOME/OPatch/opatch lsinventoryPatch  29217637     : applied on Tue May 14 15:09:38 CST 2019
Unique Patch ID:  22698154
Patch description:  "ACFS PATCH SET UPDATE 12.1.0.2.190416 (29217637)"Created on 7 Apr 2019, 21:00:58 hrs PST8PDTBugs fixed:Patch  29141168     : applied on Tue May 14 15:03:15 CST 2019
Unique Patch ID:  22698243
Patch description:  "OCW PATCH SET UPDATE 12.1.0.2.190416 (29141168)"Created on 1 Apr 2019, 05:50:10 hrs PST8PDTBugs fixed:Patch  29141015     : applied on Tue May 14 14:58:41 CST 2019
Unique Patch ID:  22785785
Patch description:  "Database Patch Set Update : 12.1.0.2.190416 (29141015)"Created on 7 Mar 2019, 05:42:36 hrs PST8PDT
Sub-patch  28729169; "Database Patch Set Update : 12.1.0.2.190115 (28729169)"
Sub-patch  28259833; "Database Patch Set Update : 12.1.0.2.181016 (28259833)"
Sub-patch  27547329; "Database Patch Set Update : 12.1.0.2.180717 (27547329)"
Sub-patch  27338041; "Database Patch Set Update : 12.1.0.2.180417 (27338041)"
Sub-patch  26925311; "Database Patch Set Update : 12.1.0.2.180116 (26925311)"
Sub-patch  26713565; "Database Patch Set Update : 12.1.0.2.171017 (26713565)"
Sub-patch  26609783; "Database Patch Set Update : 12.1.0.2.170814 (26609783)"
Sub-patch  25755742; "Database Patch Set Update : 12.1.0.2.170718 (25755742)"
Sub-patch  25171037; "Database Patch Set Update : 12.1.0.2.170418 (25171037)"
Sub-patch  24732082; "Database Patch Set Update : 12.1.0.2.170117 (24732082)"
Sub-patch  24006101; "Database Patch Set Update : 12.1.0.2.161018 (24006101)"
Sub-patch  23054246; "Database Patch Set Update : 12.1.0.2.160719 (23054246)"
Sub-patch  22291127; "Database Patch Set Update : 12.1.0.2.160419 (22291127)"
Sub-patch  21948354; "Database Patch Set Update : 12.1.0.2.160119 (21948354)"
Sub-patch  21359755; "Database Patch Set Update : 12.1.0.2.5 (21359755)"
Sub-patch  20831110; "Database Patch Set Update : 12.1.0.2.4 (20831110)"
Sub-patch  20299023; "Database Patch Set Update : 12.1.0.2.3 (20299023)"
Sub-patch  19769480; "Database Patch Set Update : 12.1.0.2.2 (19769480)"Bugs fixed:Patch  26983807     : applied on Tue May 14 14:32:20 CST 2019
Unique Patch ID:  21704746
Patch description:  "WLM Patch Set Update: 12.1.0.2.180116 (26983807)"Created on 8 Nov 2017, 07:59:12 hrs PST8PDTBugs fixed:

使用最新版的 orachk 再检查下

参考:
<<How To Download And Install The Latest OPatch(6880880) Version (文档 ID 274526.1)>>
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=239759911895075&id=274526.1&_afrWindowMode=0&_adf.ctrl-state=l512lrnp9_107

<<Patch 29176115 - Grid Infrastructure Patch Set Update 12.1.0.2.190416>>
https://updates.oracle.com/Orion/Services/download?type=readme&aru=22853418

<<Patch 29176139 - Database Proactive Bundle Patch 12.1.0.2.190416>>
https://updates.oracle.com/Orion/Services/download?type=readme&aru=22853479

<<How to Use the My Oracle Support Conflict Checker Tool for Patches Installed with OPatch [Video] (文档 ID 1091294.1)>>
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=247144148671146&id=1091294.1&_afrWindowMode=0&_adf.ctrl-state=l512lrnp9_695

<<Oracle Patch Assurance - Data Guard Standby-First Patch Apply (文档 ID 1265700.1)>>
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=249339559444072&id=1265700.1&_afrWindowMode=0&_adf.ctrl-state=l512lrnp9_890

<<How to Use the My Oracle Support Conflict Checker Tool for Patches Installed with OPatch [Video] (文档 ID 1091294.1)>>
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=260440120589827&id=1091294.1&_afrWindowMode=0&_adf.ctrl-state=17162e5744_207

<<>>

opatchauto apply 的日志如下
To patch only the GI home:

# opatchauto apply /home/grid/29176115 -oh /u01/app/grid/product/12.1.0/grid_1OPatchauto session is initiated at Tue May 14 14:11:10 2019System initialization log file is /u01/app/grid/product/12.1.0/grid_1/cfgtoollogs/opatchautodb/systemconfig2019-05-14_02-11-21PM.log.Session log file is /u01/app/grid/product/12.1.0/grid_1/cfgtoollogs/opatchauto/opatchauto2019-05-14_02-11-41PM.log
The id for this session is QJ46Executing OPatch prereq operations to verify patch applicability on home /u01/app/grid/product/12.1.0/grid_1
Patch applicability verified successfully on home /u01/app/grid/product/12.1.0/grid_1Bringing down CRS service on home /u01/app/grid/product/12.1.0/grid_1
Prepatch operation log file location: /u01/app/grid/product/12.1.0/grid_1/cfgtoollogs/crsconfig/crspatch_node1_2019-05-14_02-16-21PM.log
CRS service brought down successfully on home /u01/app/grid/product/12.1.0/grid_1Start applying binary patch on home /u01/app/grid/product/12.1.0/grid_1
Failed while applying binary patches on home /u01/app/grid/product/12.1.0/grid_1Execution of [OPatchAutoBinaryAction] patch action failed, check log for more details. Failures:
Patch Target : node1->/u01/app/grid/product/12.1.0/grid_1 Type[crs]
Details: [
---------------------------Patching Failed---------------------------------
Command execution failed during patching in home: /u01/app/grid/product/12.1.0/grid_1, host: node1.
Command failed:  /u01/app/grid/product/12.1.0/grid_1/OPatch/opatchauto  apply /home/grid/29176115 -oh /u01/app/grid/product/12.1.0/grid_1 -target_type cluster -binary -invPtrLoc /u01/app/grid/product/12.1.0/grid_1/oraInst.loc -jre /u01/app/grid/product/12.1.0/grid_1/OPatch/jre -persistresult /u01/app/grid/product/12.1.0/grid_1/OPatch/auto/dbsessioninfo/sessionresult_node1_crs.ser -analyzedresult /u01/app/grid/product/12.1.0/grid_1/OPatch/auto/dbsessioninfo/sessionresult_analyze_node1_crs.ser
Command failure output:
==Following patches FAILED in apply:Patch: /home/grid/29176115/29141015
Log: /u01/app/grid/product/12.1.0/grid_1/cfgtoollogs/opatchauto/core/opatch/opatch2019-05-14_14-32-07PM_1.log
Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException: Prerequisite check "CheckActiveFilesAndExecutables" failed.Prerequisite check "CheckActiveFilesAndExecutables" failed. After fixing the cause of failure Run opatchauto resume]
OPATCHAUTO-68061: The orchestration engine failed.
OPATCHAUTO-68061: The orchestration engine failed with return code 1
OPATCHAUTO-68061: Check the log for more details.
OPatchAuto failed.OPatchauto session completed at Tue May 14 14:33:23 2019
Time taken to complete the session 22 minutes, 14 secondsopatchauto failed with error code 42
# cat /u01/app/grid/product/12.1.0/grid_1/cfgtoollogs/opatchauto/core/opatch/opatch2019-05-14_14-32-07PM_1.log[May 14, 2019 2:33:22 PM] [INFO]    Start fuser command /sbin/fuser /u01/app/grid/product/12.1.0/grid_1/lib/libsrvm12.so at Tue May 14 14:33:22 CST 2019
[May 14, 2019 2:33:22 PM] [INFO]    Finish fuser command /sbin/fuser /u01/app/grid/product/12.1.0/grid_1/lib/libsrvm12.so at Tue May 14 14:33:22 CST 2019
[May 14, 2019 2:33:22 PM] [INFO]    Files in use by a process: /u01/app/grid/product/12.1.0/grid_1/lib/libsrvm12.so PID( 15996 )[May 14, 2019 2:33:22 PM] [INFO]    Following active executables are not used by opatch process :Following active executables are used by opatch process :/u01/app/grid/product/12.1.0/grid_1/lib/libsrvm12.so
[May 14, 2019 2:33:22 PM] [INFO]    Prerequisite check "CheckActiveFilesAndExecutables" failed.The details are:Following active executables are not used by opatch process :Following active executables are used by opatch process :/u01/app/grid/product/12.1.0/grid_1/lib/libsrvm12.so
[May 14, 2019 2:33:22 PM] [SEVERE]  OUI-67073:UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.Prerequisite check "CheckActiveFilesAndExecutables" failed.

说的是 /u01/app/grid/product/12.1.0/grid_1/lib/libsrvm12.so 有被 opatch process 使用.

# ps -fu grid
# ps -fu oracle
# loof |grep -i /u01

均没有结果,然后 opatchauto resume

# opatchauto resumeOPatchauto session is initiated at Tue May 14 14:51:34 2019
Session log file is /u01/app/grid/product/12.1.0/grid_1/cfgtoollogs/opatchauto/opatchauto2019-05-14_02-51-35PM.log
Resuming existing session with id QJ46Start applying binary patch on home /u01/app/grid/product/12.1.0/grid_1
Binary patch applied successfully on home /u01/app/grid/product/12.1.0/grid_1Starting CRS service on home /u01/app/grid/product/12.1.0/grid_1
Postpatch operation log file location: /u01/app/grid/product/12.1.0/grid_1/cfgtoollogs/crsconfig/crspatch_node1_2019-05-14_03-09-44PM.log
CRS service started successfully on home /u01/app/grid/product/12.1.0/grid_1OPatchAuto successful.--------------------------------Summary--------------------------------Patching is completed successfully. Please find the summary as follows:Host:node1
CRS Home:/u01/app/grid/product/12.1.0/grid_1
Version:12.1.0.2.0
Summary:==Following patches were SKIPPED:Patch: /home/grid/29176115/26983807
Reason: This patch is already been applied, so not going to apply again.==Following patches were SUCCESSFULLY applied:Patch: /home/grid/29176115/29141015
Log: /u01/app/grid/product/12.1.0/grid_1/cfgtoollogs/opatchauto/core/opatch/opatch2019-05-14_14-51-44PM_1.logPatch: /home/grid/29176115/29141168
Log: /u01/app/grid/product/12.1.0/grid_1/cfgtoollogs/opatchauto/core/opatch/opatch2019-05-14_14-51-44PM_1.logPatch: /home/grid/29176115/29217637
Log: /u01/app/grid/product/12.1.0/grid_1/cfgtoollogs/opatchauto/core/opatch/opatch2019-05-14_14-51-44PM_1.logOPatchauto session completed at Tue May 14 15:24:34 2019
Time taken to complete the session 33 minutes, 0 second

oracle 12.1.0.2.0 通过 DBBP 升级到 12.1.0.2.190416相关推荐

  1. mate7升级android 6.0,我的MATE7可以升级到安卓6.0

    [分享交流] 我的MATE7可以升级到安卓6.0 244022 电梯直达 肥嘟嘟189 炉火纯青 发表于 2015-10-7 10:25:14 来自:浏览器 最新回复 2015-11-9 21:12: ...

  2. android 7.0电视,将智能电视升级到Android 7.0有什么经验?为索尼用户祝福

    尽管Android 7.0系统很早以前就已正式发布,但实际上,由于Android设备的严重碎片化,并不是所有的Android设备都可以在第一时间进行升级,因此,实际上现在已经安装了Android 7. ...

  3. 荣耀N30可以升级鸿蒙,华为鸿蒙2.0系统哪些手机可以升级?鸿蒙2.0系统升级方法[图]...

    华为鸿蒙2.0系统哪些手机可以升级?相信很多玩家都还不太清楚这个鸿蒙2.0系统的方法,那么今天就让安卓乐园小编为大家带来,鸿蒙2.0系统升级方法. 华为鸿蒙2.0系统哪些手机可以升级? 华为EMUI1 ...

  4. mate7 android 5.0,强烈恳求mate7能升级到安卓5.0!!!!

    [分享交流] 强烈恳求mate7能升级到安卓5.0!!!! 208515 电梯直达 cgbcgjhdf 略有小成 发表于 2014-12-9 15:50:15 来自:浏览器 最新回复 2015-3-4 ...

  5. 小米2s升级android6.0,小米2/2S率先升级基于Android 5.0的MIUI6

    [天极网IT新闻频道][Yesky新闻频道消息]4月3日下午5点,经过三个月的内测之后,小米向小米2和小米2S推送了基于Android 5.0版的MIUI 6更新. 小米向小米2以及小米2S推送了MI ...

  6. oracle 10.2 64位,Oracle 10.2.0.5 x64升级到11.2.0.3 x64

    说明:11g数据库现在新部署的数量也很多的,对于10g数据库,现在整理一下10g到11g的升级过程.10.2.0.2以上版本才能升级到11.2.0.3版本. 升级说明:10.2.0.5(64)-> ...

  7. oracle 9.2.0.2,在RedHat enterprise server 3 安装oracle9i 2.0.0.1 并升级到9.2.0.6

    oracle9i 2.0.4上个月从oracle网站下载没有安装在els3上. 参考了网上的一些文章,并根据文章的提示找了一些资料和补丁,完成了这次的安装.[@more@] 1.安装RedHat EL ...

  8. emui11升级成鸿蒙os,华为EMUI11正式发布,今年12月可升级为鸿蒙OS2.0国产操作系统...

    华为在昨天的HDC上正式发布了,华为手机的全新操作系统EMUI11,在系统界面和过渡动画方面有了很多的进步.同时还支持了多任务窗口缩放的功能,以及优化了多屏协同功能.当然昨天的发布上,EMUI11只占 ...

  9. 华为android9升级名单,华为EMUI9.0流畅度大提升,更新内容和升级名单汇总

    9月5日,华为在上海举行了媒体沟通会.华为表示,经过6年的发展和沉淀,EMUI的全球用户已经达到了3.5亿,活跃用户覆盖216个国家和地区,而EMUI的相关开发者数量也达到了45万.与此同时,华为也在 ...

最新文章

  1. vsxxxx Avalon 感知提示
  2. python opencv 投影变换 黑边
  3. php sqlserver扩展,PHP---连接sqlserver扩展配置
  4. 【源码系列】Eureka源码分析
  5. python中e-r图_E-R图基本步骤
  6. python sqlite3
  7. 各种标点符号的英文翻译
  8. NetWare 5.1 Does Not Recognize CD-ROM Drive
  9. 取消IE“已限制此网页运行可以访问计算机的脚本
  10. BZOJ1123: [POI2008]BLO
  11. python北风网培训班视频
  12. 好程序员Python培训分享numpy简介
  13. 微软拼音 快捷输入 自定义格式的时间和日期
  14. 添加用户并赋予 root管理员权限
  15. xshell调用js脚本开发
  16. 怎么将mov格式的视频转换成MP4?
  17. Matlab 如何截取视频中的每一帧图像
  18. 无准考证号的四六级查询
  19. BZOJ1798 【AHOI2009】 seq维护序列 线段树
  20. codeforces#375(div.2)723D - Lakes in Berland dfs+bfs

热门文章

  1. saved_model_cli的使用
  2. RSI指标顶背离趋势反转信号,文华财经期货RSI底背离自动画线指标公式源码
  3. c++Builder操作Excel
  4. 免费商城源码PHP类英文商城系统cms相对好的有哪些
  5. resnet50网络实现垃圾分类
  6. 哺恩养老获资本战略投资,“传统养老机构”如何走上发展快车道?
  7. 50个爱心图案PS笔刷
  8. 企业办理的icp许可证到期怎么续期
  9. 朱广权和李佳琦直播间为国货代言;博实乐收购翰林学院51%股权 | 美通企业日报...
  10. 在OpenCV里实现LoG的Marr-Hildreth