How to Detect Conflicts Before Patching

  • by

Before you apply the new patch, you probably want to know whether the current configuration of Oracle home that conflict with the patch.

Here in this post, I will introduce several ways to detect patch conflicts.

Prerequisite Check

We use the following command to check any conflict before patching.

[oracle@primary01 31219939]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.21
Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12.1.0/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/db_1/oraInst.loc
OPatch version    : 12.2.0.1.21
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/db_1/cfgtoollogs/opatch/opatch2020-08-22_14-02-23PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

For more information, please use opatch prereq -help to list all options.

Run a Dummy Patch

If you want to patch grid infrastructures in a RAC environment, you can do a dummy patching by adding -analyze modifier to opatchauto apply. It will perform prerequisite verification and check any conflicts.

[root@primary01 ~]# export PATH=$PATH:/u01/app/12.1.0/grid/OPatch
[root@primary01 ~]# opatchauto apply /home/patches/31305174 -analyze

OPatchauto session is initiated at Wed Aug 22 14:10:57 2020

System initialization log file is /u01/app/12.1.0/grid/cfgtoollogs/opatchautodb/systemconfig2020-08-22_02-11-02PM.log.

Session log file is /u01/app/12.1.0/grid/cfgtoollogs/opatchauto/opatchauto2020-08-22_02-12-01PM.log
The id for this session is Q8B4

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

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

Patch applicability verified successfully on home /u01/app/12.1.0/grid


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

OPatchAuto successful.

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

Analysis for applying patches has completed successfully:

Host:primary01
CRS Home:/u01/app/12.1.0/grid
Version:12.1.0.2.0


==Following patches were SUCCESSFULLY analyzed to be applied:

Patch: /home/patches/31305174/26983807
Log: /u01/app/12.1.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-08-22_14-12-44PM_1.log

Patch: /home/patches/31305174/31097826
Log: /u01/app/12.1.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-08-22_14-12-44PM_1.log

Patch: /home/patches/31305174/31113348
Log: /u01/app/12.1.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-08-22_14-12-44PM_1.log

Patch: /home/patches/31305174/31136382
Log: /u01/app/12.1.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-08-22_14-12-44PM_1.log


Host:primary01
RAC Home:/u01/app/oracle/product/12.1.0/db_1
Version:12.1.0.2.0


==Following patches were SKIPPED:

Patch: /home/patches/31305174/26983807
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /home/patches/31305174/31097826
Reason: This patch is not applicable to this specified target type - "rac_database"


==Following patches were SUCCESSFULLY analyzed to be applied:

Patch: /home/patches/31305174/31113348
Log: /u01/app/oracle/product/12.1.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2020-08-22_14-12-46PM_1.log

Patch: /home/patches/31305174/31136382
Log: /u01/app/oracle/product/12.1.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2020-08-22_14-12-46PM_1.log



OPatchauto session completed at Wed Aug 22 14:16:08 2020
Time taken to complete the session 5 minutes, 11 seconds

As you can see, the dummy run checks both DB home and Grid home. Also, you can use the -analyze modifier to predict the result of opatchauto rollback.

Please note that, opatchauto does not run for Oracle home, it's a Grid-infrastructure limited tool. For more usages, you may refer to: OPatchAuto Syntax and Commands, Release 13.3.

Use My Oracle Support Checker Tool

Oracle provide an UI checker tool in My Oracle Support (MOS) website for us to check any conflicts before actual patching. You may take a look: How to Use My Oracle Support Conflict Checker tool.

Leave a Reply

Your email address will not be published. Required fields are marked *