关于19c RU补丁报错问题的分析处理

关于,19c,ru,补丁,报错,问题,分析,处理 · 浏览次数 : 251

小编点评

## Summary of generated content This content details the steps involved in applying an Oracle patch to a RAC database. **Patching process steps:** 1. **Check patch applicability:** The patch is first checked for its applicability based on the target type and UPI. 2. **Apply patch:** If the patch is applicable, it is applied to the database. 3. **Post-patch operations:** After the patch is applied, various post-patch operations are performed, including: * Applying an Oracle patch to the Oracle Home. * Updating the Oracle patch application status. * Cleaning up temporary files. **Patching details:** * **Patch ID:** TPIGExecuting OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.3.0/db_1Patch applicability verified successfully on home /u01/app/oracle/product/19.3.0/db_1Executing patch validation checks on home /u01/app/oracle/product/19.3.0/db_1Patch validation checks successfully completed on home /u01/app/oracle/product/19.3.0/db_1. * **Applied patch versions:** 19.0, 19.16, 19.16.0.0, 19.16.0.220719. **Overall, the patch application process is straightforward and efficient, ensuring that the necessary changes are applied to the database without causing any issues.**

正文

本文演示关于19c RU补丁常见报错问题的分析处理:

1.查看补丁应用失败的原因

补丁应用失败有详细日志记录原因; 故意使用oracle用户解压补丁,然后测试是否可以opatchauto apply应用:
[root@db01rac2 media]# /u01/app/19.3.0/grid/OPatch/opatchauto apply /u01/media/ru/34130714
...
/u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-10_17-40-25PM_1.log
[Jan 10, 2023 5:41:03 PM] [INFO]    Patch 34160635:
                                    Copy Action: Source File "/u01/media/ru/34130714/34160635/files/bin/ocrcheck.bin" does not exists or is not readable
                                    'oracle.has.crs, 19.0.0.0.0': Cannot copy file from 'ocrcheck.bin' to '/u01/app/19.3.0/grid/bin/ocrcheck.bin'
...

发现报错,查看log说ocrcheck.bin不存在或不可读,实际查看是不可读。

2.问题解决后可继续应用补丁

解决问题后可以使用opatchauto resume继续尝试: 重新使用grid用户解压RU补丁包,然后使用root用户尝试resume补丁应用:
/u01/app/19.3.0/grid/OPatch/opatchauto resume

实际输出如下:

[root@db01rac2 media]# /u01/app/19.3.0/grid/OPatch/opatchauto resume

OPatchauto session is initiated at Tue Jan 10 17:48:40 2023
Session log file is /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/opatchauto2023-01-10_05-48-40PM.log
Resuming existing session with id CBK3

Start applying binary patch on home /u01/app/19.3.0/grid
Binary patch applied successfully on home /u01/app/19.3.0/grid


Performing postpatch operations on CRS - starting CRS service on home /u01/app/19.3.0/grid
Postpatch operation log file location: /u01/app/grid/crsdata/db01rac2/crsconfig/crs_postpatch_apply_inplace_db01rac2_2023-01-10_05-55-25PM.log
CRS service started successfully on home /u01/app/19.3.0/grid

OPatchAuto successful.

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

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

Host:db01rac2
CRS Home:/u01/app/19.3.0/grid
Version:19.0.0.0.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /u01/media/ru/34130714/33575402
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-10_17-49-00PM_1.log

Patch: /u01/media/ru/34130714/34133642
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-10_17-49-00PM_1.log

Patch: /u01/media/ru/34130714/34139601
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-10_17-49-00PM_1.log

Patch: /u01/media/ru/34130714/34160635
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-10_17-49-00PM_1.log

Patch: /u01/media/ru/34130714/34318175
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-10_17-49-00PM_1.log



OPatchauto session completed at Tue Jan 10 18:00:06 2023
Time taken to complete the session 11 minutes, 27 seconds
[root@db01rac2 media]# 

3.发现DB的RU补丁未更新

检查补丁应用情况发现DB的补丁未更新
查看RU补丁发现DB的补丁未应用,这是因为DB没有安装数据库,其实在11g时就有这个问题:

[root@db01rac2 media]# su - grid
Last login: Tue Jan 10 20:04:29 CST 2023
[grid@db01rac2 ~]$ $ORACLE_HOME/OPatch/opatch lspatches;
34318175;TOMCAT RELEASE UPDATE 19.0.0.0.0 (34318175)
34160635;OCW RELEASE UPDATE 19.16.0.0.0 (34160635)
34139601;ACFS RELEASE UPDATE 19.16.0.0.0 (34139601)
34133642;Database Release Update : 19.16.0.0.220719 (34133642)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)

OPatch succeeded.

[root@db01rac2 media]# su - oracle
Last login: Tue Jan 10 20:04:30 CST 2023
[oracle@db01rac2 ~]$ $ORACLE_HOME/OPatch/opatch lspatches;
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)

OPatch succeeded.

那么在当前暂不需要安装数据库的场景,如何让DB补丁也更新呢?

解决方案两种:
一是应用补丁之前先建一个临时测试库,补丁应用时就会自动应用GI和DB软件的补丁,最后再删掉临时测试库就好。
二是GI应用完成后,再单独指定db的ORACLE_HOME进行应用:

# /u01/app/oracle/product/19.3.0/db_1/OPatch/opatchauto apply /u01/media/ru/34130714 -oh /u01/app/oracle/product/19.3.0/db_1

需要注意这里,如果你要用grid用户下的opatchauto应用db的home补丁,会报错的:

# /u01/app/19.3.0/grid/OPatch/opatchauto apply /u01/media/ru/34130714 -oh /u01/app/oracle/product/19.3.0/db_1

opatchauto must run from one of the homes specified
opatchauto returns with error code = 2

说明必须要用Oracle自己的opatchauto,这也是为啥总是在解压OPatch时,解压到各节点grid和oracle的目录原因,说不定啥场景就要用的到。
最后应用完成后查询成功:

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

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

Host:db01rac1
RAC Home:/u01/app/oracle/product/19.3.0/db_1
Version:19.0.0.0.0
Summary:

==Following patches were SKIPPED:

Patch: /u01/media/ru/34130714/34139601
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /u01/media/ru/34130714/33575402
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /u01/media/ru/34130714/34318175
Reason: This patch is not applicable to this specified target type - "rac_database"


==Following patches were SUCCESSFULLY applied:

Patch: /u01/media/ru/34130714/34133642
Log: /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-10_21-12-52PM_1.log

Patch: /u01/media/ru/34130714/34160635
Log: /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-10_21-12-52PM_1.log



OPatchauto session completed at Tue Jan 10 21:19:41 2023
Time taken to complete the session 8 minutes, 43 seconds
[root@db01rac1 ~]# su - oracle
Last login: Tue Jan 10 21:19:40 CST 2023
[oracle@db01rac1 ~]$ $ORACLE_HOME/OPatch/opatch lspatches;
34160635;OCW RELEASE UPDATE 19.16.0.0.0 (34160635)
34133642;Database Release Update : 19.16.0.0.220719 (34133642)

OPatch succeeded.

4.opatchauto应用DB补丁报错解决

下面看opatchauto应用DB补丁报错的情况,opatchauto报错信息:

[root@db01rac2 media]# /u01/app/oracle/product/19.3.0/db_1/OPatch/opatchauto apply /u01/media/ru/34130714 -oh /u01/app/oracle/product/19.3.0/db_1

OPatchauto session is initiated at Tue Jan 10 21:20:19 2023

System initialization log file is /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatchautodb/systemconfig2023-01-10_09-20-28PM.log.

Session log file is /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatchauto/opatchauto2023-01-10_09-20-51PM.log
The id for this session is 2SXU

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.3.0/db_1
Patch applicability verification failed on home /u01/app/oracle/product/19.3.0/db_1

Execution of [OPatchAutoBinaryAction] patch action failed, check log for more details. Failures:
Patch Target : db01rac2->/u01/app/oracle/product/19.3.0/db_1 Type[rac]
Details: [
---------------------------Patching Failed---------------------------------
Command execution failed during patching in home: /u01/app/oracle/product/19.3.0/db_1, host: db01rac2.
Command failed:  /u01/app/oracle/product/19.3.0/db_1/OPatch/opatchauto  apply /u01/media/ru/34130714 -oh /u01/app/oracle/product/19.3.0/db_1 -target_type rac_database -binary -invPtrLoc /u01/app/oracle/product/19.3.0/db_1/oraInst.loc -jre /u01/app/oracle/product/19.3.0/db_1/OPatch/jre -persistresult /u01/app/oracle/product/19.3.0/db_1/opatchautocfg/db/sessioninfo/sessionresult_analyze_db01rac2_rac_2.ser -analyze -online -prepare_home
Command failure output: 
==Following patches FAILED in analysis for apply:

Patch: /u01/media/ru/34130714/34160635
Log: /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-10_21-21-11PM_1.log
Reason: Failed during Analysis: /u01/media/ru/34130714/34160635 is not applicable to the oracle home /u01/app/oracle/product/19.3.0/db_1

Patch: /u01/media/ru/34130714/34133642
Log: /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-10_21-21-11PM_1.log
Reason: Failed during Analysis: /u01/media/ru/34130714/34133642 is not applicable to the oracle home /u01/app/oracle/product/19.3.0/db_1 

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 Jan 10 21:21:22 2023
Time taken to complete the session 1 minute, 4 seconds

 opatchauto failed with error code 42
[root@db01rac2 media]# 

查看日志:

Possible causes are:
   ORACLE_HOME/inventory/oneoffs/34133642 is corrupted. 
   PatchObject constructor: Input file "/u01/app/oracle/product/19.3.0/db_1/inventory/oneoffs/34133642/etc/config/actions" or "/u01/app/oracle/product/19.3.0/db_1/inventory/oneoffs/34133642/etc/config/inventory" does not exist.

这里确认确实节点2现在没有这个34133642的目录,但是查看已成功应用补丁的节点1是有的。
在想要不要copy过来,是否可行?
另外从ru的补丁介质中也有这两个文件,但是md5比对,和节点1的还不一样,主要是actions.xml不一样。
还是查下MOS吧,果然找到:

  • OPatch lsinventory or Apply New Patch With Opatch apply Fails With Error "Unable to create patchObject" Inventory Corrupted (Doc ID 2792549.1)

提到还是从成功应用补丁的节点拷贝这个目录:

  1. Execute opatch lsinventory in node1 in which patch was applied successfully to verify patch is there (32545013)
  2. If patch was applied successfully, you will need to take a backup of "ORACLE_HOME/inventory/oneoffs/32545013" and then copy the directory from node1 to node2.
  3. Try running opatch lsinventory again.
  4. If, inventory is showing details and patch applied, proceed with Post-Installation Instructions.

既然有了官方依据,那就从节点1拷贝报错缺少的34133642目录到节点2,然后再尝试应用补丁:

[oracle@db01rac1 oneoffs]$ scp -r 34133642 db01rac2:/u01/app/oracle/product/19.3.0/db_1/inventory/oneoffs
inventory.xml                                                                                                        100%  904KB  77.5MB/s   00:00    
actions.xml                                                                                                          100% 6950KB 107.8MB/s   00:00    

节点2确认拷贝成功,尝试应用补丁:

[oracle@db01rac2 oneoffs]$ pwd
/u01/app/oracle/product/19.3.0/db_1/inventory/oneoffs
[oracle@db01rac2 oneoffs]$ cls
-bash: cls: command not found
[oracle@db01rac2 oneoffs]$ ls
29517242  29585399  34133642
[oracle@db01rac2 oneoffs]$ ls -lrth
total 0
drwxr-x--- 4 oracle oinstall 29 Jan 10 09:43 29517242
drwxr-x--- 4 oracle oinstall 29 Jan 10 09:43 29585399
drwxr-xr-x 4 oracle oinstall 29 Jan 10 21:43 34133642
[oracle@db01rac2 oneoffs]$ exit
logout
[root@db01rac2 config]# /u01/app/oracle/product/19.3.0/db_1/OPatch/opatchauto apply /u01/media/ru/34130714 -oh /u01/app/oracle/product/19.3.0/db_1

OPatchauto session is initiated at Tue Jan 10 21:43:53 2023

System initialization log file is /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatchautodb/systemconfig2023-01-10_09-43-58PM.log.

Session log file is /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatchauto/opatchauto2023-01-10_09-44-19PM.log
The id for this session is TPIG

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.3.0/db_1
Patch applicability verified successfully on home /u01/app/oracle/product/19.3.0/db_1


Executing patch validation checks on home /u01/app/oracle/product/19.3.0/db_1
Patch validation checks successfully completed on home /u01/app/oracle/product/19.3.0/db_1


Verifying SQL patch applicability on home /u01/app/oracle/product/19.3.0/db_1
No sqlpatch prereq operations are required on the local node for this home
No step execution required.........
 

Preparing to bring down database service on home /u01/app/oracle/product/19.3.0/db_1
No step execution required.........
 

Performing prepatch operation on home /u01/app/oracle/product/19.3.0/db_1
Prepatch operation completed successfully on home /u01/app/oracle/product/19.3.0/db_1


Start applying binary patch on home /u01/app/oracle/product/19.3.0/db_1
Binary patch applied successfully on home /u01/app/oracle/product/19.3.0/db_1


Performing postpatch operation on home /u01/app/oracle/product/19.3.0/db_1
Postpatch operation completed successfully on home /u01/app/oracle/product/19.3.0/db_1


Preparing home /u01/app/oracle/product/19.3.0/db_1 after database service restarted
No step execution required.........
 

Trying to apply SQL patch on home /u01/app/oracle/product/19.3.0/db_1
No sqlpatch operations are required on the local node for this home
SQL patch applied successfully on home /u01/app/oracle/product/19.3.0/db_1

OPatchAuto successful.

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

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

Host:db01rac2
RAC Home:/u01/app/oracle/product/19.3.0/db_1
Version:19.0.0.0.0
Summary:

==Following patches were SKIPPED:

Patch: /u01/media/ru/34130714/34139601
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /u01/media/ru/34130714/33575402
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /u01/media/ru/34130714/34318175
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /u01/media/ru/34130714/34133642
Log: /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-10_21-44-38PM_1.log
Reason: /u01/media/ru/34130714/34133642 is not required to be applied to oracle home /u01/app/oracle/product/19.3.0/db_1


==Following patches were SUCCESSFULLY applied:

Patch: /u01/media/ru/34130714/34160635
Log: /u01/app/oracle/product/19.3.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-10_21-45-49PM_1.log



OPatchauto session completed at Tue Jan 10 21:46:52 2023
Time taken to complete the session 3 minutes, 0 second

咦,34133642没成功?还是已经成功了?看下日志:

[Jan 10, 2023 9:45:24 PM] [INFO]    Prereq "checkForIdenticalPatchInOracleHome" failed.
[Jan 10, 2023 9:45:24 PM] [INFO]    The details are:

                                    The following patch(es) are identical patches with patches installed in the Oracle Home.
                                     [ 34133642]
                                    You have already installed same patch(es) with same UPI(s) or same version(s).

日志说之前已经安装成功了,再通过opatch检查下,实际果然安装都成功了:

[oracle@db01rac2 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
34160635;OCW RELEASE UPDATE 19.16.0.0.0 (34160635)
34133642;Database Release Update : 19.16.0.0.220719 (34133642)

OPatch succeeded.

嗯,基本RU补丁应用也就这样了,不报错很简单,即使遇到报错,通常解决起来难度也不大。

与关于19c RU补丁报错问题的分析处理相似的内容:

关于19c RU补丁报错问题的分析处理

本文演示关于19c RU补丁常见报错问题的分析处理: 1.查看补丁应用失败的原因 2.问题解决后可继续应用补丁 3.发现DB的RU补丁未更新 4.opatchauto应用DB补丁报错解决 1.查看补丁应用失败的原因 补丁应用失败有详细日志记录原因; 故意使用oracle用户解压补丁,然后测试是否可以

C#应用的用户配置窗体方案 - 开源研究系列文章

这次继续整理以前的代码。本着软件模块化的原理,这次笔者对软件中的用户配置窗体进行剥离出来,单独的放在一个Dll类库里进行操作,这样在其它应用程序里也能够快速的复用该类库,达到了快速开发软件的效果。 笔者其它模块化应用的例子: C#的关于窗体的类库方案 - 开源研究系列文章 C#应用的欢迎界面窗体方案

关于sar的学习

# 关于sar的学习 ## 背景 ``` 公司一套基于某冷门Python架构的系统前几天出现异常卡顿. 当时安装的时候必须使用ubuntu系统. 所以当时默认安装的ubuntu1804, 本来想尝试使用一下sar查看卡顿时期的系统状况 但是发现没有默认安装. 并且最近虽然有node-exporter

视频编码耗时长、编码帧发送失败…DVPP视频编码问题典型案例分析

摘要:本期就分享几个关于DVPP视频编码问题的典型案例,并给出原因分析及解决方法 本文分享自华为云社区《DVPP媒体数据处理视频编码问题案例》,作者:昇腾CANN。 DVPP(Digital Vision Pre-Processing)是昇腾AI处理器内置的图像处理单元,通过AscendCL媒体数据

基于SqlSugar的开发框架循序渐进介绍(19)-- 基于UniApp+Vue的移动前端的功能介绍

在之前的SqlSugar系列随笔中,介绍了很多我们关于SqlSugar的开发框架的内容,SqlSugar的开发框架的目的是多前端应用场景,因此其中会包含各种不同的前端应用,前面介绍了基于DevExpress的Winform的前端应用,以及基于Vue3+TypeScript+ElementPlus的BS前端应用,本篇随笔继续介绍SqlSugar的开发框架的另一个前端应用,基于UniApp+Vue+T

开源!开源一个flutter实现的古诗拼图游戏

去年(2023年)年底我初学flutter,看了一些文档和教程,想找个东西*练练手。 小时候看过一个关于历史名人儿时事迹的短片,有一集是讲*总理的,有一个细节我记得很清楚:幼年***经常要做一个游戏--有一堆纸片,每片纸上一个字,他要一个一个字拼起*拼成一首诗。 很多年前我就想,或许可以把这个游戏做

机器学习-周志华

第一章 绪论 机器学习: 致力于研究如何通过计算的手段,利用经验来改善系统自身的性能。在计算机系统中,“经验”通常以“数据“形式存在,因此,机器学习所研究的主要内容,是关于在计算机上从数据中产生”模型“的算法,即”学习算法“。有了学习算法,我们把经验数据提供给它,他就能基于这些数据产生模型;在面对新

阅读翻译Prompting Engineering Guides之Introduction(提示工程简介)

阅读翻译Prompting Engineering Guides之Introduction(提示工程简介) 关于 首次发表日期:2024-07-19 Prompting Engineering Guides官网: https://www.promptingguide.ai/zh 使用ChatGPT和

Java 21 新特性:switch的模式匹配

在之前的Java 17新特性中,我们介绍过关于JEP 406: switch的模式匹配,但当时还只是关于此内容的首个预览版本。之后在JDK 18、JDK 19、JDK 20中又都进行了更新和完善。如今,在JDK 21中,该特性得到了最终确定!下面,我们就再正式学习一下该功能! 在以往的switch语

LeetCode 周赛上分之旅 #39 结合中心扩展的单调栈贪心问题

> ⭐️ **本文已收录到 AndroidFamily,技术和职场问题,请关注公众号 \[彭旭锐] 和 [BaguTree Pro](https://www.mdnice.com/writing/85b28c4e60354865a423728e668fc570) 知识星球提问。** > > 学习数据