opatchauto : ContentsXML/oui-patch.xml (Permission denied)

SYMPTOMS

When applying 19c GI JULY 2020 RU ( 19.8.0.0), opatchauto failed with following errors:

[root@racnode2 ~]# opatchauto apply /tmp/31305339/
...
..
.

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.

Subscribe to get access

Read more of this content when you subscribe today.

Deinstall 18c Grid Infrastructure Home After Being Upgraded to 19c

Grid Infrastructure 18c has been upgraded to 19c GI successfully. So 18c GI_HOME needs to be de-installed.  There are two ways to uninstall the old GI_HOME ( 18c ).

Subscribe to get access

Read more of this content when you subscribe today.

How to Apply Oracle RAC PSU/RU/RUR Patches by Using Fleet Maintenance in Oracle Enterprise Manager Cloud Control

It is a recommended new way to apply patches by using fleet maintenance in  Enterprise Manager (EM) Cloud Control .  Fleet maintenance uses the Out of Place Patching option. Also this can be done only via emcli verb and there is no GUI option available.

This post demonstrates how to apply the latest Release Update DB Apr 2020 Release Update 12.2.0.1.200414  and  OJVM Apr 2020 Release Update 12.2.0.1.200414.

Environment:

RAC Database : RACTESTB
RAC Instances: RACTESTB1 / RACTESTB2
Current ORACLE_HOME:    /u01/app/oracle/product/12.2.0/dbhome_1
Referenced ORACLE_HOME: /u01/app/oracle/product/12.2.0/dbhome_g
REF_TARGET_NAME : OraDB12c_Home1_g
New Out of Place ORACLE_HOME:/u01/app/oracle/product/12.2.0/dbhome_2

Subscribe to get access

Read more of this content when you subscribe today.

Check and Confirm RU and OJVM Applied into CDB/PDB

Check patches have been applied onto CDB.

SQL> connect / as sysdba
SQL> select PATCH_ID,VERSION,STATUS,ACTION,DESCRIPTION 
       from dba_registry_sqlpatch 
      where DESCRIPTION like '%12.2.0.1.200414%';

  PATCH_ID VERSION   STATUS   ACTION  DESCRIPTION
---------- --------- -------- ------- ------------------------------------------------
  30805580 12.2.0.1 SUCCESS  APPLY    OJVM RELEASE UPDATE 12.2.0.1.200414
  30886680 12.2.0.1 SUCCESS  APPLY    DATABASE APR 2020 RELEASE UPDATE 12.2.0.1.200414

Also confirm patches have been applied onto PDB.

SQL> alter session set container=RACTESTBPDB;

Session altered.

SQL> select PATCH_ID,VERSION,STATUS,ACTION,DESCRIPTION 
from dba_registry_sqlpatch 
where DESCRIPTION like '%12.2.0.1.200414%';

PATCH_ID VERSION STATUS ACTION DESCRIPTION
---------- --------- -------- ------- ------------------------------------------
30805580 12.2.0.1 SUCCESS APPLY OJVM RELEASE UPDATE 12.2.0.1.200414
30886680 12.2.0.1 SUCCESS APPLY DATABASE APR 2020 RELEASE UPDATE 12.2.0.1.200414

Check Cluster Database Configuration Updated with New Home

Oracle targets and cluster database are updated with new ORACLE_HOME accordingly.

[oracle@racnode1 ~]$ srvctl config database -d RACTESTB
Database unique name: RACTESTB
Database name: RACTESTB
Oracle home: /u01/app/oracle/product/12.2.0/dbhome_2
...
..
.

Running runcluvfy.sh Fails with PRVG-11250 : The check “RPM Package Manager database” was not performed because it needs ‘root’ user privileges.

Before upgrading Oracle 18c GI to 19c GI, to check the readiness of your Oracle Clusterware installation for upgrading, running runcluvfy.sh gets PRVG-11250 errors:

[grid@racnode1 grid]$ ./runcluvfy.sh stage -pre crsinst -upgrade -rolling \
-src_crshome /u01/app/18.0.0/grid -dest_crshome /u01/app/19.0.0/grid \
-dest_version 19.6.0.0 -verbose 
...
..
.
Verifying RPM Package Manager database ...INFORMATION
PRVG-11250 : The check "RPM Package Manager database" was not performed 
because it needs 'root' user privileges.
...
..
.

Subscribe to get access

Read more of this content when you subscribe today.

gridSetup.sh Fails with “ERROR: The home is not clean”

Before upgrading Oracle 18c GI to 19c GI, trying to apply the latest GI RU patches onto 19c gold image, it fails like following:

[grid@racnode1 grid]$ ./gridSetup.sh -silent -applyRU /media/sf_Software/Patches/19c/30463609
Preparing the home to patch...
Applying the patch /media/sf_Software/Patches/19c/30463609...
OPatch command failed while applying the patch. For details look at the logs from /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/

It is because the patch path is not correct, patch 30463609 is Combo of OJVM  and GI. The correct path should be the sub-directory one.

[grid@racnode1 grid]$ ./gridSetup.sh -silent -applyRU /media/sf_Software/Patches/19c/30463609/30501910

ERROR: The home is not clean. This home cannot be used since there was a failed OPatch execution in this home. Use a different home to proceed.

When the command gridSetup.sh fails,  it makes the NEW_HOME unusable.

The only way to get around this issue currently is to clean the contents out of that HOME , and unzip the gold image again.

[grid@racnode1 ~]$ cd /u01/app/19.0.0/grid/
[grid@racnode1 grid]$ rm -fr * 
[grid@racnode1 grid]$ unzip <SW-LOCATION>/LINUX.X64_193000_grid_home.zip -d ./
[grid@racnode1 grid]$ ./gridSetup.sh -silent -applyRU /media/sf_Software/Patches/19c/30463609/30501910
Preparing the home to patch...
Applying the patch /media/sf_Software/Patches/19c/30463609/30501910...
Successfully applied the patch.
The log can be found at: /u01/app/oraInventory/logs/GridSetupActions2020-04-11_10-53-32PM/installerPatchActions_2020-04-11_10-53-32PM.log
Launching Oracle Grid Infrastructure Setup Wizard...

[FATAL] [INS-40426] Grid installation option has not been specified.
   ACTION: Specify the valid installation option.
[grid@racnode1 grid]$