Patching Oracle DB home with - Patch 26636295: COMBO OF OJVM COMPONENT 12.1.0.2.171017 DB PSU + DB BP 12.1.0.2.171017
Patching Oracle DB home with - Patch 26636295: COMBO OF OJVM COMPONENT 12.1.0.2.171017 DB PSU + DB BP 12.1.0.2.171017
It took me a lot of time to decide what to be my first post, because the Internet is full of information, cases and etc.
But I have decided to write about this case because I think that it would be good to have it here and share knowledge with you all.
This topic is about patching Oracle Database Home 12.1.0.2 with the below Combo:
Patch 26636295: COMBO OF OJVM COMPONENT 12.1.0.2.171017 DB PSU + DB BP 12.1.0.2.171017
With this Combo you can also patch GI Home, but in our case we are patching only Database Home. (For reference you could check the readme in MOS)
Let's start with the steps that should be followed in order to accomplish the task.
First of all, you have to change the Opatch version to 12.2.0.1.7 or later based on the readme from the patch and as a best practises
Also you should be aware that lower OPatch version may lead to conflicts during patching process and this is primary due to patch level changes in the OPatch version.
In order to change the version do the following:
cd $ORACLE_HOME mv OPatch OPatch_old cd /stage/newpatch/ unzip p6880880_122010_Linux-x86-64.zip -d /u01/app/db/12.1.0.2/db1_temp/ Check the OPatch version: $ORACLE_HOME/OPatch/opatch -version Then unzip the Combo patch: unzip p26636295_121020_Linux-x86-64.zip [oracle@polya-rac1 newpatch]$ cd 26636295/ One of the folders (26635845) is fro DB PSU and BP and the other is for OJVM (26635845) |
.... Now we have to perform some pre-requisite steps
[oracle@polya-rac1 26636295]$ /u01/app/db/12.1.0.2/db1_temp/OPatch/opatch lsinventory -detail -oh /u01/app/db/12.1.0.2/db1_temp/ Oracle Interim Patch Installer version 12.2.0.1.10
Lsinventory Output file location : /u01/app/db/12.1.0.2/db1_temp/cfgtoollogs/opatch/lsinv/lsinventory2017-11-06_16-10-30PM.txt -------------------------------------------------------------------------------- Installed Top-level Products (1): Oracle Database 12c 12.1.0.2.0
.... cut OPatch succeeded. |
Then check only for Database Home as home user - in our case oracle user :
PREREQ session Oracle Home : /u01/app/db/12.1.0.2/db1_temp Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded. PREREQ session Oracle Home : /u01/app/db/12.1.0.2/db1_temp Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded. |
Now we will check if enough free space is available in the Database Home:
Create file /tmp/patch_list_dbhome.txt with the following content:
Then run the following: /u01/app/db/12.1.0.2/db1_temp/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt .... PREREQ session Oracle Home : /u01/app/db/12.1.0.2/db1_temp Invoking prereq "checksystemspace" Prereq "checkSystemSpace" passed. OPatch succeeded. |
Then as root you have to run opatchauto apply -analyze option. It is simuating all steps online which will be done at the time of the patching:
[root@polya-rac1 26636295]# /u01/app/db/12.1.0.2/db1_temp/OPatch/opatchauto apply /stage/newpatch/26636295/26635880 -oh /u01/app/db/12.1.0.2/db1_temp/ -analyze OPatchauto session is initiated at Mon Nov 6 16:26:30 2017 Session log file is /u01/app/db/12.1.0.2/db1_temp/cfgtoollogs/opatchauto/opatchauto2017-11-06_04-27-29PM.log Executing OPatch prereq operations to verify patch applicability on home /u01/app/db/12.1.0.2/db1_temp
OPatchAuto successful. --------------------------------Summary-------------------------------- Analysis for applying patches has completed successfully: Host:polya-rac1
Patch: /stage/newpatch/26636295/26635880/21436941 Patch: /stage/newpatch/26636295/26635880/26392164
Patch: /stage/newpatch/26636295/26635880/26392192 Patch: /stage/newpatch/26636295/26635880/26717470 OPatchauto session completed at Mon Nov 6 16:28:26 2017 |
**** In the session log file we can see what checks are performed. The log file can be found in the output of the prompt command.
.... All seems fine. With this command we will patch explicitly only DB home and will shutdown only databases that are running of this home.
When it completes run the below command without -analyze again with root user:
[root@polya-rac1 26636295]# /u01/app/db/12.1.0.2/db1_temp/OPatch/opatchauto apply /stage/newpatch/26636295/26635880 -oh /u01/app/db/12.1.0.2/db1_temp/ OPatchauto session is initiated at Mon Nov 6 16:31:42 2017 System initialization log file is /u01/app/db/12.1.0.2/db1_temp/cfgtoollogs/opatchautodb/systemconfig2017-11-06_04-31-59PM.log. Session log file is /u01/app/db/12.1.0.2/db1_temp/cfgtoollogs/opatchauto/opatchauto2017-11-06_04-32-25PM.log Executing OPatch prereq operations to verify patch applicability on home /u01/app/db/12.1.0.2/db1_temp
OPatchAuto successful. --------------------------------Summary-------------------------------- Patching is completed successfully. Please find the summary as follows: Host:polya-rac1 ==Following patches were SKIPPED: Patch: /stage/newpatch/26636295/26635880/21436941 Patch: /stage/newpatch/26636295/26635880/26392164
Patch: /stage/newpatch/26636295/26635880/26392192 Patch: /stage/newpatch/26636295/26635880/26717470 OPatchauto session completed at Mon Nov 6 16:59:43 2017 |
**** For more details about the checks and steps that are performed, we can check the session log again.
Now we can check the inventory:
[oracle@polya-rac1 tmp]$ cd /u01/app/db/12.1.0.2/db1_temp/OPatch
Lsinventory Output file location : /u01/app/db/12.1.0.2/db1_temp/cfgtoollogs/opatch/lsinv/lsinventory2017-11-06_17-01-42PM.txt -------------------------------------------------------------------------------- Installed Top-level Products (1): Oracle Database 12c 12.1.0.2.0 Interim patches (3) : Patch 26717470 : applied on Mon Nov 06 16:59:02 CET 2017 ... cut... Patch 26392192 : applied on Mon Nov 06 16:33:28 CET 2017 ... cut ... Patch 19877336 : applied on Wed Mar 11 13:44:48 CET 2015 -------------------------------------------------------------------------------- OPatch succeeded. |
###########
DB PSU + DB BP 12.1.0.2.171017 applied.
###########
Then you have to apply OJVM:
as oracle user check for conflicts:
[oracle@polya-rac1 ~]$ cd /stage/newpatch/26636295/26635845 PREREQ session Oracle Home : /u01/app/db/12.1.0.2/db1_temp Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded. |
Now applying ...
[oracle@polya-rac1 26635845]$ /u01/app/db/12.1.0.2/db1_temp/OPatch/opatch apply -local
Verifying environment and performing prerequisite checks... Do you want to proceed? [y|n] Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
Patching component oracle.javavm.server, 12.1.0.2.0... Patching component oracle.javavm.server.core, 12.1.0.2.0... Patching component oracle.rdbms.dbscripts, 12.1.0.2.0... Patching component oracle.rdbms, 12.1.0.2.0... Patching component oracle.javavm.client, 12.1.0.2.0... Patching component oracle.dbjava.jdbc, 12.1.0.2.0... Patching component oracle.dbjava.ic, 12.1.0.2.0... OPatch succeeded. |
Check again the inventory in order to see OJVM is applied:
[oracle@polya-rac1 OPatch]$ ./opatch lsinv
Lsinventory Output file location : /u01/app/db/12.1.0.2/db1_temp/cfgtoollogs/opatch/lsinv/lsinventory2017-11-08_16-48-42PM.txt -------------------------------------------------------------------------------- Installed Top-level Products (1): Oracle Database 12c 12.1.0.2.0
Patch 26635845 : applied on Mon Nov 06 17:06:10 CET 2017 |
### A few steps have left. In order to apply the patches in the database, we have to perform the below steps.
Because we have OJVM, we have to set cluster_database to FALSE and startup upgrade:
[oracle@polya-rac1 OPatch]$ sqlplus / as sysdba Total System Global Area 4294967296 bytes NAME TYPE VALUE
SQL*Plus: Release 12.1.0.2.0 Production on Tue Nov 7 16:12:03 2017 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to an idle instance. SQL> startup upgrade; Total System Global Area 4294967296 bytes Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_34240_2017_11_07_16_12_49/sqlpatch_invocation.log Connecting to database...OK Current state of SQL patches: Adding patches to installation queue and performing prereq checks... Installing patches... Validating logfiles...
SQL*Plus: Release 12.1.0.2.0 Production on Tue Nov 7 16:15:27 2017 Copyright (c) 1982, 2014, Oracle. All rights reserved.
SQL> set lines 300 PATCH_ID PATCH_UID VERSION FLAGS ACTION STATUS BUNDLE_SERIES DESCRIPTION SQL> System altered. SQL> shu immediate; |
### Now we have applied successfully COMBO OF OJVM COMPONENT 12.1.0.2.171017 DB PSU + DB BP 12.1.0.2.171017
I hope that this article will be helpful and if you have any comments to share them.
2 comments
Comment from: kkovachki Member

Comment from: polya Member

Thank you for your feedback! :)
Very useful!!
I will use your howto in the next patching!!!