Oracle集群管理-19.3升级19.18 opatchauto总结(java报错,resume oneoffs缺失目录)

  1. 升级 到19.18

    1. 升级GRID软件

  1. OPatch Utility Information

[root@orcl1 grid]# mv OPatch OPatchbak

[root@orcl1 grid]# mv /home/grid/OPatch ./

[root@orcl1 grid]# su - grid

Last login: Fri Jul 14 15:22:35 CST 2023

[grid@orcl1 ~]$ opatch version

OPatch Version: 12.2.0.1.36

OPatch succeeded.

[grid@orcl1 ~]$

  1. .1.1.2 Validation of Oracle Inventory

opatch lsinventory -detail -oh /u01/app/19c/grid/

操作步骤如下:

1 创建目录,存放补丁包,并赋予权限。

  1. 节点1grid

[root@eomsdb1 ~]# mkdir /19.18

[root@eomsdb1 ~]# chown grid:oinstall /19.18

[root@eomsdb1 ~]# chmod 775 /19.18

As grid

Unzip the patch as the Grid home owner except for installations that do not have any Grid homes. For installations where this patch is applied to the Oracle home only, the patch must be unzipped as the Oracle home owner:

$ unzip p34762026_190000_.zip

[grid@eomsdb1 19.4]$ unzip p34762026_190000_Linux-x86-64.zip

  1. 2.1.1.4 Run OPatch Conflict Check

As the Grid home user:

opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/34765931
[grid@orcl1 ~]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/34765931
Oracle Interim Patch Installer version 12.2.0.1.36
Copyright (c) 2023, Oracle Corporation.  All rights reserved.
PREREQ session
Oracle Home       : /u01/app/19c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/19c/grid/oraInst.loc
OPatch version    : 12.2.0.1.36
OUI version       : 12.2.0.7.0
Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2023-07-14_15-42-37PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/34768559
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/34768569
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/34863894
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/33575402



  • For Oracle home, as home user:
  • % $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/34765931

% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/34768559

  1. 2.1.1.5 Run OPatch System Space Check

Check if enough free space is available on the ORACLE_HOME filesystem for the patches to be applied as given below:

Create file /tmp/patch_list_gihome.txt with the following content:

% cat /tmp/patch_list_gihome.txt

/19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/34765931

/19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/34768559

/19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/34768569

/19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/34863894

/19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/33575402

opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt

  • For Grid Infrastructure home, as home user:
    1. Create file /tmp/patch_list_gihome.txt with the following content:
    2. % cat /tmp/patch_list_gihome.txt
    3. /34762026/34765931
    4. /34762026/34768559
    5. /34762026/34768569
    6. /34762026/34863894
    7. /34762026/33575402

Note:

For HP-UX Itanium and Linux on IBM System z platforms, the last two rows in the previous example should not be added to the patch_list_gihome.txt file.

    1. Run the OPatch command to check if enough free space is available in the Grid Infrastructure home:
    2. % $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
  • For Oracle home, as home user:
    1. Create file /tmp/patch_list_dbhome.txt with the following content:
    2. % cat /tmp/patch_list_dbhome.txt
    3. /34762026/34765931
    4. /34762026/34768559
    5. Run OPatch command to check if enough free space is available in the Oracle home:
% $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
  1. 2.1. OPatchAuto

/u01/app/19c/grid/OPatch/opatchauto apply /19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026 -oh /u01/app/19c/grid/

报错如下:

Patch: /19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026/34863894

Log: /u01/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-07-14_15-59-01PM_1.log

Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException: ApplySession failed in system modification phase... 'ApplySession::apply failed: /u01/app/19c/grid/bin/patchgen: line 138: /u01/app/19c/grid/jdk/bin/java: Permission denied' - -安装包权限问题,将解压的安装包全部改为777.

但是部分补丁已经打完,使用resume则报错。

解决方案:

将安装包文件的权限全部改成777.就继续执行了上述命令 ,

但是此时开始就报错

[root@orcl1 RU]# more /u01/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-07-14_16-08-50PM_1.log

[Jul 14, 2023 4:08:56 PM] [INFO]    ENTERING METHOD: NApplyReportForPrereqs(OPatchPatch[] patches,OPatchNApplyOptions options)

[Jul 14, 2023 4:08:56 PM] [INFO]    [OPSR-TIME] Loading cooked inventory

[Jul 14, 2023 4:08:56 PM] [INFO]    [OPSR-MEMORY] : Loading cooked one offs. Heap memory used 646 (MB)

[Jul 14, 2023 4:08:57 PM] [INFO]    Stack Description: oracle.opatch.opatchsdk.OPatchException: Unable to create patchObject

                                    Possible causes are:

                                       ORACLE_HOME/inventory/oneoffs/33575402 is corrupted. PatchObject constructor: Input file "/u01/app/19c/grid/inventory/oneoffs/33575402/etc/config/actions" or "/u01/app/19c/grid/inventory/oneoffs/335

75402/etc/config/inventory" does not exist.   (那个认为补丁已经打上了,但是oneoffs目录里面没有。。。)

此时使用opatch lsinv也是报错 ,

解决方案:

于是我将其他集群的对应缺少目录拷贝过来 ,此时显示已经升级到19.18

但是集群是无法启动的报错 :

CRS-6706

[grid@orcl1 ~]$ opatch lspatches

34765931;DATABASE RELEASE UPDATE : 19.18.0.0.230117 (REL-JAN230131) (34765931)

29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

29517247;ACFS RELEASE UPDATE 19.3.0.0.0 (29517247)

29401763;TOMCAT RELEASE UPDATE 19.0.0.0.0 (29401763)

[grid@orcl1 ~]$ opatch lspatches

29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

29517247;ACFS RELEASE UPDATE 19.3.0.0.0 (29517247)

29517242;Database Release Update : 19.3.0.0.190416 (29517242)

29401763;TOMCAT RELEASE UPDATE 19.0.0.0.0 (29401763)

于是使用如下命令对补丁进行回滚

/u01/app/19c/grid/OPatch/opatchauto rollback /19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026 -oh /u01/app/19c/grid/

回滚成功了

在正常执行opatchauto apply

[grid@eomsdb1 ~]$ crsctl query crs softwarepatch

Oracle Clusterware patch level on node eomsdb1 is [1651835407].

[grid@eomsdb2 ~]$ crsctl query crs softwarepatch

Oracle Clusterware patch level on node eomsdb2 is [479021767].

[grid@eomsdb1 ~]$ crsctl query crs softwarepatch

Oracle Clusterware patch level on node eomsdb1 is [1651835407].

[grid@eomsdb2 ~]$ crsctl query crs softwarepatch

Oracle Clusterware patch level on node eomsdb2 is [479021767].

    1. 升级 oracle软件

节点1

[root@orcl1 ~]# chown -R oracle:oinstall /19.18/

[root@orcl1 ~]# chmod -R 775 /19.18/

更新opatch

To patch one or more Oracle RAC database homes:

# opatchauto apply /34762026 -oh ,

[root@orcl1 ~]# /u01/app/oracle/product/19c/db_1/OPatch/opatchauto apply /19.18/19.18/RU/p34762026_190000_Linux-x86-64/34762026 -oh /u01/app/oracle/product/19c/db_1

你可能感兴趣的:(ORACLE数据库RAC管理,ORACLE数据库升级,PSU,jvm,RU补丁,oracle,数据库)