非tns方式登录pdb方法

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:非tns方式登录pdb方法

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

非tns方式登录pdb方法之—-alter session set container

[oracle@db01 ~]$ env|grep ORA
ORACLE_SID=DCXFF
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19c/db_1
[oracle@db01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Oct 9 22:10:34 2023
Version 19.20.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 XFFPDB1                        READ WRITE NO
SQL> show con_name;

CON_NAME
------------------------------
CDB$ROOT
SQL> alter session set container=XFFPDB1;

Session altered.

SQL> show con_name;

CON_NAME
------------------------------
XFFPDB1
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

非tns方式登录pdb方法之—-ORACLE_PDB_SID

[oracle@db01 ~]$ export ORACLE_PDB_SID=XFFPDB1
[oracle@db01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Oct 9 22:11:30 2023
Version 19.20.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

SQL> SHOW pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 XFFPDB1                        READ WRITE NO
SQL> show con_name;

CON_NAME
------------------------------
XFFPDB1
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

参考:How To Connect to PDB By OS Authentication In 19c Container Database Environment (Doc ID 2729416.1)

19c sqlplus / as sysdba 登录慢分析

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:19c sqlplus / as sysdba 登录慢分析

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

sqlplus / as sysdba登录非常慢

[oracle@xifenfei trace]$ date
Fri Oct 29 00:04:27 CST 2021
[oracle@xifenfei trace]$ sqlplus / as sysdba<< EOF
> exit;
> EOF

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Oct 29 00:04:28 2021
Version 19.3.0.0.0

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



Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@xifenfei trace]$ date
Fri Oct 29 00:04:49 CST 2021

sqlpus 一个简单的登录+退出使用了22秒,严重的慢,通过strace分析发现访问以下两个ip,但是10.11.0.41非常慢,10.13.0.41很快,并且通过一些信息53端口,判断可能是dns服务器的ip

connect(9, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.13.0.41")}, 16) = 0

connect(12, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.11.0.41")}, 16) = 0

进一步确认,确认是该服务器配置的dns服务器

[root@xifenfei ~]# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 10.13.0.41
nameserver 10.11.0.41

对这两个ip的连通性进行测试

[root@xifenfei ~]# ping 10.13.0.41
PING 10.13.0.41 (10.13.0.41) 56(84) bytes of data.
64 bytes from 10.13.0.41: icmp_seq=1 ttl=126 time=0.616 ms
^C
--- 10.13.0.41 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.616/0.616/0.616/0.000 ms
[root@xifenfei ~]# ping  10.11.0.41
PING 10.11.0.41 (10.11.0.41) 56(84) bytes of data.
^C
--- 10.11.0.41 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2063ms

[root@xifenfei ~]# 

确认10.11.0.41 ip不通,对于此类问题最快的解决方案就是除掉不可使用的dns服务器,然后测试登录和退出时间

[oracle@szd18dbts01 trace]$ date
Fri Oct 29 00:21:12 CST 2021
[oracle@szd18dbts01 trace]$ sqlplus / as sysdba<< EOF
> exit;
> EOF

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Oct 29 00:21:12 2021
Version 19.3.0.0.0

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

date

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@szd18dbts01 trace]$ date
Fri Oct 29 00:21:13 CST 2021

通过除掉不可用的dns服务器ip之后,测试时间为1s,恢复正常

19c 非第一个节点执行root.sh报Error 4 opening dom ASM/Self in 错误

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:19c 非第一个节点执行root.sh报Error 4 opening dom ASM/Self in 错误

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

在linux 7.9的系统中安装oracle 19c的rac,在第二个节点执行root.sh报以下错误
Error 4 opening dom ASM/Self in 0x425a470
Domain name to open is ASM/Self
Error 4 opening dom ASM/Self in 0x425a470

[root@rac2 tmp]# /u01/app/19c/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19c/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/19c/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/rac2/crsconfig/rootcrs_rac2_2021-08-27_10-54-04AM.log
2021/08/27 10:54:07 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2021/08/27 10:54:07 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2021/08/27 10:54:07 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2021/08/27 10:54:07 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2021/08/27 10:54:08 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
Redirecting to /bin/systemctl restart rsyslog.service
2021/08/27 10:54:08 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2021/08/27 10:54:08 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2021/08/27 10:54:09 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2021/08/27 10:54:09 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2021/08/27 10:54:18 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2021/08/27 10:54:18 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2021/08/27 10:54:19 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2021/08/27 10:54:21 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2021/08/27 10:55:06 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2021/08/27 10:55:18 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2021/08/27 10:55:35 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2021/08/27 10:56:07 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2021/08/27 10:56:08 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2021/08/27 10:56:15 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2021/08/27 10:57:01 CLSRSC-343: Successfully started Oracle Clusterware stack
2021/08/27 10:57:01 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2021/08/27 10:57:10 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2021/08/27 10:57:15 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Error 4 opening dom ASM/Self in 0x425a470
Domain name to open is ASM/Self 
Error 4 opening dom ASM/Self in 0x425a470
[root@rac2 tmp]# 

通过查询mos,发现相关文档:19C: While Executing Root.sh on Remote Nodes HIT UNEXPECTED “ERROR 4 OPENING DOM ASM/SELF IN 0x57f7d60″ (Doc ID 2571719.1)
20210903084403


确认是oracle一个bug,在20c版本中修复(20c没有对外发布,应该在21c中修复),这个bug不影响,可以忽略

提供19.11(含202104patch)完整版db和grid下载

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:提供19.11(含202104patch)完整版db和grid下载

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

最近实施了一套19c rac并且打上patch 32545008(GI Update 202104)和32399816(OJVM Update 202104),通过createGoldImage 创建了安装程序,直接使用该zip包即可安装含gi/db(含ojvm) 2021年4月的patch

[oracle@dzbl1 ~]$ $ORACLE_HOME/runInstaller -createGoldImage -silent -destinationLocation /tmp/soft_img
Launching Oracle Database Setup Wizard...

Successfully Setup Software.
Gold Image location: /tmp/soft_img/db_home_2021-05-20_09-05-40PM.zip


[oracle@dzbl1 ~]$ exit
logout
[root@dzbl1 ~]# su - grid
Last login: Thu May 20 20:57:05 CST 2021
[grid@dzbl1 ~]$ ./gridSetup.sh -createGoldImage  -silent -destinationLocation /tmp/soft_img
-bash: ./gridSetup.sh: No such file or directory
[grid@dzbl1 ~]$ $ORACLE_HOME/gridSetup.sh -createGoldImage  -silent -destinationLocation /tmp/soft_img
Launching Oracle Grid Infrastructure Setup Wizard...

Successfully Setup Software.
Gold Image location: /tmp/soft_img/grid_home_2021-05-20_09-13-58PM.zip


[grid@dzbl1 ~]$ md5sum  /tmp/soft_img/grid_home_2021-05-20_09-13-58PM.zip
7cefb1be8ead8250435d5a95785d1239  /tmp/soft_img/grid_home_2021-05-20_09-13-58PM.zip
[grid@dzbl1 ~]$ md5sum /tmp/soft_img/db_home_2021-05-20_09-05-40PM.zip
325841792c44f168c524b440440773b0  /tmp/soft_img/db_home_2021-05-20_09-05-40PM.zip
[grid@dzbl1 ~]$ opatch lspatches
32585572;DBWLM RELEASE UPDATE 19.0.0.0.0 (32585572)
32584670;TOMCAT RELEASE UPDATE 19.0.0.0.0 (32584670)
32579761;OCW RELEASE UPDATE 19.11.0.0.0 (32579761)
32576499;ACFS RELEASE UPDATE 19.11.0.0.0 (32576499)
32545013;Database Release Update : 19.11.0.0.210420 (32545013)

OPatch succeeded.
[grid@dzbl1 ~]$ su - oracle
Password: 
Last login: Thu May 20 21:04:33 CST 2021 on pts/1
[oracle@dzbl1 ~]$ opatch lspatches
32399816;OJVM RELEASE UPDATE: 19.11.0.0.210420 (32399816)
32579761;OCW RELEASE UPDATE 19.11.0.0.0 (32579761)
32545013;Database Release Update : 19.11.0.0.210420 (32545013)

OPatch succeeded.
[oracle@dzbl1 ~]$ ls -l /tmp/soft_img/
total 9225956
-rw-r--r-- 1 oracle oinstall 4268265132 May 20 21:13 db_home_2021-05-20_09-05-40PM.zip
-rw-r--r-- 1 grid   oinstall 5179109549 May 20 21:21 grid_home_2021-05-20_09-13-58PM.zip
[oracle@dzbl1 ~]$ 

20210520212657


下载到win,并且按照oracle官方命名方式进程重命名,并且md5验证,确定文件完整性
20210520234704

C:\Users\XFF>CertUtil -hashfile E:\vm_shared\LINUX.X64_1911000_grid_home.zip md5
MD5 的 E:\vm_shared\LINUX.X64_1911000_grid_home.zip 哈希:
7cefb1be8ead8250435d5a95785d1239
CertUtil: -hashfile 命令成功完成。

C:\Users\XFF>CertUtil -hashfile E:\vm_shared\LINUX.X64_1911000_db_home.zip md5
MD5 的 E:\vm_shared\LINUX.X64_1911000_db_home.zip 哈希:
325841792c44f168c524b440440773b0
CertUtil: -hashfile 命令成功完成。

提供下载link,可以直接下载19.11完整版db和grid(该版本含2021年4月份patch):Oracle 19.11 database和grid软件下载,提取码为:bamf.下载之后请验证md5,确认没有别其他人修改.

19c 打RU patch遇到oui-patch.xml (Permission denied)问题

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:19c 打RU patch遇到oui-patch.xml (Permission denied)问题

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

有一段时间没有做实施的活,今天安装一套19c rac,并且计划安装Patch 32545008 – GI Release Update 19.11.0.0.210420,在安装过程中遇到oui-patch.xml问题,记录下来供参考:
1. OPATCHAUTO-72088

[root@jbsbdb1 ~]# opatchauto apply /u01/soft/32545008

OPatchauto session is initiated at Wed Apr 28 14:20:24 2021

System initialization log file is /u01/app/19.0/grid/cfgtoollogs/opatchautodb/systemconfig2021-04-28_02-20-29PM.log.

Session log file is /u01/app/19.0/grid/cfgtoollogs/opatchauto/opatchauto2021-04-28_02-20-57PM.log
The id for this session is N2PG

Wrong OPatch software installed in following homes:
Host:jbsbdb2, Home:/u01/app/oracle/product/19.0/db_1

Host:jbsbdb2, Home:/u01/app/19.0/grid

OPATCHAUTO-72088: OPatch version check failed.
OPATCHAUTO-72088: OPatch software version in homes selected for patching are different.
OPATCHAUTO-72088: Please install same OPatch software in all homes.
OPatchAuto failed.

OPatchauto session completed at Wed Apr 28 14:21:15 2021
Time taken to complete the session 0 minute, 51 seconds

 opatchauto failed with error code 42

故障原因,只是升级了节点1的grid和oracle的opatch,把节点2的opatch也升级之后该问题解决

2. oui-patch.xml (Permission denied)文件处理

[root@jbsbdb2 soft]# opatchauto apply /u01/soft/32545008

OPatchauto session is initiated at Wed Apr 28 14:52:29 2021

System initialization log file is /u01/app/19.0/grid/cfgtoollogs/opatchautodb/systemconfig2021-04-28_02-52-32PM.log.

Session log file is /u01/app/19.0/grid/cfgtoollogs/opatchauto/opatchauto2021-04-28_02-52-58PM.log
The id for this session is T6ST

Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.0/grid

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

Patch applicability verified successfully on home /u01/app/oracle/product/19.0/db_1


Executing patch validation checks on home /u01/app/19.0/grid
Patch validation checks successfully completed on home /u01/app/19.0/grid


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


Verifying SQL patch applicability on home /u01/app/oracle/product/19.0/db_1
SQL patch applicability verified successfully on home /u01/app/oracle/product/19.0/db_1


Preparing to bring down database service on home /u01/app/oracle/product/19.0/db_1
Successfully prepared home /u01/app/oracle/product/19.0/db_1 to bring down database service


Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19.0/grid
Prepatch operation log file location: 
/u01/app/grid/crsdata/jbsbdb2/crsconfig/crs_prepatch_apply_inplace_jbsbdb2_2021-04-28_02-54-34PM.log
CRS service brought down successfully on home /u01/app/19.0/grid


Performing prepatch operation on home /u01/app/oracle/product/19.0/db_1
Perpatch operation completed successfully on home /u01/app/oracle/product/19.0/db_1


Start applying binary patch on home /u01/app/oracle/product/19.0/db_1
Failed while applying binary patches on home /u01/app/oracle/product/19.0/db_1

Execution of [OPatchAutoBinaryAction] patch action failed, check log for more details. Failures:
Patch Target : jbsbdb2->/u01/app/oracle/product/19.0/db_1 Type[rac]
Details: [
---------------------------Patching Failed---------------------------------
Command execution failed during patching in home: /u01/app/oracle/product/19.0/db_1, host: jbsbdb2.
Command failed:  /u01/app/oracle/product/19.0/db_1/OPatch/opatchauto 
 apply /u01/soft/32545008 -oh /u01/app/oracle/product/19.0/db_1 -target_type rac_database
 -binary -invPtrLoc /u01/app/19.0/grid/oraInst.loc -jre /u01/app/19.0/grid/OPatch/jre -persistresult
/u01/app/oracle/product/19.0/db_1/opatchautocfg/db/sessioninfo/sessionresult_jbsbdb2_rac_2.ser -analyzedresult
 /u01/app/oracle/product/19.0/db_1/opatchautocfg/db/sessioninfo/sessionresult_analyze_jbsbdb2_rac_2.ser
Command failure output: 
==Following patches FAILED in apply:

Patch: /u01/soft/32545008/32545013
Log: /u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2021-04-28_15-00-49PM_1.log
Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException: 
ApplySession failed in system modification phase... 
'ApplySession::apply failed: java.io.IOException: oracle.sysman.oui.patch.PatchException: 
java.io.FileNotFoundException: /u01/app/oraInventory/ContentsXML/oui-patch.xml (Permission denied)' 

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 Wed Apr 28 15:05:29 2021
Time taken to complete the session 13 minutes, 0 second

 opatchauto failed with error code 42

在节点1打patch成功之后,对节点2进行打patch,遇到类似:ApplySession::apply failed: java.io.IOException: oracle.sysman.oui.patch.PatchException:
java.io.FileNotFoundException: /u01/app/oraInventory/ContentsXML/oui-patch.xml (Permission denied)问题,通过查询mos发现类似文章opatchauto apply Results java.io.FileNotFoundException: /ContentsXML/oui-patch.xml (Permission denied) Error in Non-OUI Nodes (Doc ID 2582139.1),确认是bug 29859410 在20.1版本中修复.检查系统中对应oui-patch.xml信息.

[root@jbsbdb2 soft]# ls -l /u01/app/oraInventory/ContentsXML/oui-patch.xml
-rw-r----- 1 grid oinstall 174 Apr 28 14:04 /u01/app/oraInventory/ContentsXML/oui-patch.xml

确实文件权限不对,对其授权处理

[root@jbsbdb2 soft]# chmod 660 /u01/app/oraInventory/ContentsXML/oui-patch.xml
[root@jbsbdb2 soft]# ls -l /u01/app/oraInventory/ContentsXML/oui-patch.xml
-rw-rw---- 1 grid oinstall 174 Apr 28 14:04 /u01/app/oraInventory/ContentsXML/oui-patch.xml

处理oui-patch.xml文件异常之后,尝试回滚操作

[root@jbsbdb2 soft]# opatchauto rollback /u01/soft/32545008

OPatchauto session is initiated at Wed Apr 28 15:13:58 2021

System initialization log file is /u01/app/19.0/grid/cfgtoollogs/opatchautodb/systemconfig2021-04-28_03-14-00PM.log.

Session log file is /u01/app/19.0/grid/cfgtoollogs/opatchauto/opatchauto2021-04-28_03-14-28PM.log
The id for this session is KFYI

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.0/db_1

Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.0/grid
Patch applicability verified successfully on home /u01/app/19.0/grid

Patch applicability verification failed on home /u01/app/oracle/product/19.0/db_1

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

Patch: /u01/soft/32545008/32579761
Log: 
Reason: Failed during listing in Analysis: java.lang.Exception: oracle.opatch.opatchsdk.OPatchException: 
Unable to create patchObject
Possible causes are:
   ORACLE_HOME/inventory/oneoffs/32545013 is corrupted. PatchObject constructor: 
Input file "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/32545013/etc/config/actions" 
or "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/32545013/etc/config/inventory" does not exist.


Patch: /u01/soft/32545008/32545013
Log: 
Reason: Failed during listing in Analysis: java.lang.Exception: oracle.opatch.opatchsdk.OPatchException: 
Unable to create patchObject
Possible causes are:
   ORACLE_HOME/inventory/oneoffs/32545013 is corrupted. PatchObject constructor:
 Input file "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/32545013/etc/config/actions" 
or "/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/32545013/etc/config/inventory" does not exist. 

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 Wed Apr 28 15:14:50 2021
Time taken to complete the session 0 minute, 53 seconds

 opatchauto failed with error code 42

检查发现/u01/app/oracle/product/19.0/db_1/inventory/oneoffs/32545013确实不存在,从节点1把该文件夹tar过来,然后再次回滚

[root@jbsbdb2 ~]# /u01/app/oracle/product/19.0/db_1/OPatch/opatchauto rollback /u01/soft/32545008 -oh 
>/u01/app/oracle/product/19.0/db_1

OPatchauto session is initiated at Wed Apr 28 16:12:33 2021

System initialization log file is 
/u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchautodb/systemconfig2021-04-28_04-12-36PM.log.

Session log file is /u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchauto/opatchauto2021-04-28_04-12-53PM.log
The id for this session is JRS3

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


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


Verifying SQL patch applicability on home /u01/app/oracle/product/19.0/db_1
SQL patch applicability verified successfully on home /u01/app/oracle/product/19.0/db_1


Preparing to bring down database service on home /u01/app/oracle/product/19.0/db_1
Successfully prepared home /u01/app/oracle/product/19.0/db_1 to bring down database service


Bringing down database service on home /u01/app/oracle/product/19.0/db_1
Following database(s) and/or service(s) are stopped and will be restarted later during the session: racdb
Database service successfully brought down on home /u01/app/oracle/product/19.0/db_1


Performing prepatch operation on home /u01/app/oracle/product/19.0/db_1
Perpatch operation completed successfully on home /u01/app/oracle/product/19.0/db_1


Start rolling back binary patch on home /u01/app/oracle/product/19.0/db_1
Binary patch rolled back successfully on home /u01/app/oracle/product/19.0/db_1


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


Starting database service on home /u01/app/oracle/product/19.0/db_1
Database service successfully started on home /u01/app/oracle/product/19.0/db_1


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

Trying to roll back SQL patch on home /u01/app/oracle/product/19.0/db_1
SQL patch rolled back successfully on home /u01/app/oracle/product/19.0/db_1

OPatchAuto successful.

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

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

Host:jbsbdb2
RAC Home:/u01/app/oracle/product/19.0/db_1
Version:19.0.0.0.0
Summary:

==Following patches were SKIPPED:

Patch: /u01/soft/32545008/32576499
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /u01/soft/32545008/32585572
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /u01/soft/32545008/32584670
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /u01/soft/32545008/32579761
Reason: This Patch does not exist in the home, it cannot be rolled back.


==Following patches were SUCCESSFULLY rolled back:

Patch: /u01/soft/32545008/32545013
Log: /u01/app/oracle/product/19.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2021-04-28_16-15-05PM_1.log

回滚成功,直接使用opatchauto apply /u01/soft/32545008打节点2成功
3. RU安装成功结果

[grid@jbsbdb2 ~]$ opatch lspatches
32585572;DBWLM RELEASE UPDATE 19.0.0.0.0 (32585572)
32584670;TOMCAT RELEASE UPDATE 19.0.0.0.0 (32584670)
32579761;OCW RELEASE UPDATE 19.11.0.0.0 (32579761)
32576499;ACFS RELEASE UPDATE 19.11.0.0.0 (32576499)
32545013;Database Release Update : 19.11.0.0.210420 (32545013)

OPatch succeeded.

[oracle@jbsbdb2 ~]$ opatch lspatches
32579761;OCW RELEASE UPDATE 19.11.0.0.0 (32579761)
32545013;Database Release Update : 19.11.0.0.210420 (32545013)

OPatch succeeded.
[grid@jbsbdb2 ~]$ crsctl query crs softwarepatch
Oracle Clusterware patch level on node jbsbdb2 is [3331580692].
[grid@jbsbdb2 ~]$ crsctl query crs activeversion -f
Oracle Clusterware active version on the cluster is [19.0.0.0.0]. 
The cluster upgrade state is [NORMAL]. The cluster active patch level is [3331580692].

SQL> select PATCH_ID,DESCRIPTION from dba_registry_sqlpatch;

  PATCH_ID
----------
DESCRIPTION
--------------------------------------------------------------------------------
  29517242
Database Release Update : 19.3.0.0.190416 (29517242)

  32545013
Database Release Update : 19.11.0.0.210420 (32545013)

在打patch之前已经知晓该问题,比较粗心的把oui-patch.xml文件从节点1scp拷贝到节点2,没有确认oui-patch.xml权限(拷贝过来是640)从而引起后续很多麻烦