While analyzing/applying patch to both grid and db at a same time using opatchauto command , got below error.
root@dbaclass01:/export/home/oracle# /gridapp/app/oracle/product/grid12c/OPatch/opatchauto apply /oradbtrace/JAN2021BP/32131231 -analyze OPatchauto session is initiated at Thu Apr 15 11:10:45 2021 System initialization log file is /gridapp/app/oracle/product/grid12c/cfgtoollogs/opatchautodb/systemconfig2021-04-15_11-10-50AM.log. Session log file is /gridapp/app/oracle/product/grid12c/cfgtoollogs/opatchauto/opatchauto2021-04-15_11-12-20AM.log The id for this session is UVGK dbaclass01 Wrong OPatch software installed in following homes: Host:dbaclass01, Home:/gridapp/app/oracle/product/grid12c Host:dbaclass01, Home:/oracle/app/oracle/product/126.96.36.199/dbhome_1 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 Thu Apr 15 11:12:38 2021 Time taken to complete the session 1 minute, 54 seconds
The above opatch command is trying to apply the patch on both grid and rdbms homes. So for this to succeed the opatch utility version should be same for both grid and rdbms homes.
Check opatch version for grid home:
$GRID_HOME/OPatch/opatch version OPatch Version: 188.8.131.52.23
Check opatch version for rdbms home:
$ORACLE_HOME/OPatch/opatch version OPatch Version: 184.108.40.206.21
We can see the both the opatch versions are different, So apply the same opatch utility to both the homes to make sure that both of them have same opatch version.
You can see below link for :
If you dont want to change the opatch utility version, then to avoid this error, you can apply the patch on grid_home and rdbms_home separately as below.
For applying patch on grid_home:
root@dbaclass01:/export/home/oracle# /gridapp/app/oracle/product/grid12c/OPatch/opatchauto apply /oradbtrace/JAN2021BP/32131231 -oh /gridapp/app/oracle/product/grid12c
For applying patch on rdbms_home:
root@dbaclass01:/export/home/oracle# /oracle/app/oracle/product/dbhome_1/OPatch/opatchauto apply /oradbtrace/JAN2021BP/32131231 -oh /oracle/app/oracle/product/dbhome_1