In this article we will apply the latest PSU applied to Database Home.
Latest Patch : Database Jan 2020 Release Update : 12.2.0.1.200114 (30593149)
We need to initially download the desired PSU and My Oracle Support compatible OPatch utility (support.oracle.com).
- Doc ID 2118136.2 -> Quick References to Patch Numbers for Database / GI PSU, SPU (CPU), Bundle Patches and Patchsets.
- Doc ID 274526.1 -> How To Download And Install The Latest OPatch (6880880) Version.
The next step is to install OPatch in Database Home:
- Find the Database Home.
- Back up the old OPatch utility
- Unzip the new OPatch in Oracle Home
Check the OPatch version. We upgrade the opatch utility as per README file in patch.
[oracle@oemserver ~]$ export PATH=$ORACLE_HOME/OPatch:$PATH [oracle@oemserver ~]$ opatch version OPatch Version: 12.2.0.1.19 OPatch succeeded. [oracle@oemserver ~]$
Now, shutdown the database.
[oracle@oemserver ~]$ . oraenv ORACLE_SID = [oracle] ? oem02 The Oracle base has been set to /u01/app/oracle/product/12.2.0/dbhome_1_oem [oracle@oemserver ~]$ [oracle@oemserver ~]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Tue Feb 25 00:11:53 2020 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> shut immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production [oracle@oemserver ~]$
Then stop the listener before patching.
[oracle@oemserver ~]$ lsnrctl stop LISTENER_OEM LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 25-FEB-2020 00:12:38 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oemserver)(PORT=1521))) The command completed successfully [oracle@oemserver ~]$
Go to the directory where the patch has downloaded and unzip it.
[oracle@oemserver ~]$ cd /u01/sw [oracle@oemserver sw]$ ls 30593149 PatchSearch.xml [oracle@oemserver sw]$ cd 30593149/ [oracle@oemserver 30593149]$ ls custom etc files README.html README.txt [oracle@oemserver sw]$
Now, set the environmental varible and run the precheck for conflicts. If there is any conflicts, then contact Oracle Support for validation or merge patch if needed.
[oracle@oemserver 30593149]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./ Oracle Interim Patch Installer version 12.2.0.1.19 Copyright (c) 2020, Oracle Corporation. All rights reserved. PREREQ session Oracle Home : /u01/app/oracle/product/12.2.0/dbhome_1_oem Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/12.2.0/dbhome_1_oem/oraInst.loc OPatch version : 12.2.0.1.19 OUI version : 12.2.0.1.4 Log file location : /u01/app/oracle/product/12.2.0/dbhome_1_oem/cfgtoollogs/opatch/opatch2020-02-29_23-18-17PM_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded. [oracle@oemserver 30593149]$
Finally, you can apply the patch.
Note: -silent is used to suppresses any user-interaction
[oracle@oemserver 30593149]$ opatch apply -silent Oracle Interim Patch Installer version 12.2.0.1.19 Copyright (c) 2020, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/12.2.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/12.2.0/dbhome_1/oraInst.loc OPatch version : 12.2.0.1.19 OUI version : 12.2.0.1.4 Log file location : /u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/opatch/opatch2020-02-25_00-21-28AM_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 30593149 Do you want to proceed? [y|n] Y (auto-answered by -silent) User Responded with: Y All checks passed. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/u01/app/oracle/product/12.2.0/dbhome_1') Is the local system ready for patching? [y|n] Y (auto-answered by -silent) User Responded with: Y Backing up files... Applying interim patch '30593149' to OH '/u01/app/oracle/product/12.2.0/dbhome_1' ApplySession: Optional component(s) [ oracle.network.cman, 12.2.0.1.0 ] , [ oracle.oid.client, 12.2.0.1.0 ] , [ oracle.ons.daemon, 12.2.0.1.0 ] , [ oracle.has.crs, 12.2.0.1.0 ] , [ oracle.rdbms.drdaas, 12.2.0.1.0 ] not present in the Oracle Home or a higher version is found. Patching component oracle.rdbms.util, 12.2.0.1.0... Patching component oracle.rdbms.rsf, 12.2.0.1.0... Patching component oracle.network.rsf, 12.2.0.1.0... Patching component oracle.rdbms, 12.2.0.1.0... Patching component oracle.ctx, 12.2.0.1.0... Patching component oracle.ctx.rsf, 12.2.0.1.0... Patching component oracle.has.common.cvu, 12.2.0.1.0... Patching component oracle.ldap.rsf, 12.2.0.1.0... Patching component oracle.rdbms.dbscripts, 12.2.0.1.0... Patching component oracle.rdbms.deconfig, 12.2.0.1.0... Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0... Patching component oracle.sdo, 12.2.0.1.0... Patching component oracle.sdo.locator, 12.2.0.1.0... Patching component oracle.sqlplus.ic, 12.2.0.1.0... Patching component oracle.tfa, 12.2.0.1.0... Patching component oracle.precomp.rsf, 12.2.0.1.0... Patching component oracle.rdbms.oci, 12.2.0.1.0... Patching component oracle.xdk, 12.2.0.1.0... Patching component oracle.rdbms.crs, 12.2.0.1.0... Patching component oracle.sqlplus, 12.2.0.1.0... Patching component oracle.assistants.server, 12.2.0.1.0... Patching component oracle.rdbms.dv, 12.2.0.1.0... Patching component oracle.assistants.acf, 12.2.0.1.0... Patching component oracle.oraolap, 12.2.0.1.0... Patching component oracle.rdbms.rman, 12.2.0.1.0... Patching component oracle.rdbms.lbac, 12.2.0.1.0... Patching component oracle.ldap.client, 12.2.0.1.0... Patching component oracle.xdk.rsf, 12.2.0.1.0... Patching component oracle.install.deinstalltool, 12.2.0.1.0... Patching component oracle.rdbms.install.plugins, 12.2.0.1.0... Patching component oracle.ons, 12.2.0.1.0... Patching component oracle.oracore.rsf, 12.2.0.1.0... Patching component oracle.assistants.deconfig, 12.2.0.1.0... Patching component oracle.ldap.rsf.ic, 12.2.0.1.0... Patching component oracle.xdk.parser.java, 12.2.0.1.0... Patching component oracle.nlsrtl.rsf, 12.2.0.1.0... Patching component oracle.precomp.common, 12.2.0.1.0... Patching component oracle.precomp.lang, 12.2.0.1.0... Patching component oracle.jdk, 1.8.0.91.0... Patch 30593149 successfully applied. Log file location: /u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/opatch/opatch2020-02-25_00-21-28AM_1.log OPatch succeeded. [oracle@oemserver 30593149]$
You can cross check the patch with opatch utility.
[oracle@oemserver 30593149]$ opatch lspatches 30593149;Database Jan 2020 Release Update : 12.2.0.1.200114 (30593149) OPatch succeeded. [oracle@oemserver 30593149]$
Now, start the database & listener.
[oracle@oemserver 30593149]$ lsnrctl start LISTENER_OEM LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 25-FEB-2020 00:28:18 Copyright (c) 1991, 2016, Oracle. All rights reserved. Starting /u01/app/oracle/product/12.2.0/dbhome_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 12.2.0.1.0 - Production System parameter file is /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora Log messages written to /u01/app/oracle/diag/tnslsnr/oemserver/listener_oem/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oemserver)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oemserver)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER_OEM Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 25-FEB-2020 00:28:18 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/oemserver/listener_oem/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oemserver)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) The listener supports no services The command completed successfully [oracle@oemserver 30593149]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Sat Feb 29 23:22:53 2020 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 3070230528 bytes Fixed Size 8625416 bytes Variable Size 1862271736 bytes Database Buffers 1191182336 bytes Redo Buffers 8151040 bytes Database mounted. Database opened. SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production [oracle@oemserver 30593149]$
Run the datapatch to make the entry in database registry.
[oracle@oemserver 30593149]$ datapatch -verbose SQL Patching tool version 12.2.0.1.0 Production on Sat Feb 29 23:23:23 2020 Copyright (c) 2012, 2019, Oracle. All rights reserved. Log file for this invocation: /u01/app/oracle/product/12.2.0/dbhome_1_oem/cfgtoollogs/sqlpatch/sqlpatch_10590_2020_02_29_23_23_23/sqlpatch_invocation.log Connecting to database...OK Bootstrapping registry and package to current versions...done Determining current state...done Current state of SQL patches: Bundle series DBRU: ID 191015 in the binary registry and ID 200114 in the SQL registry Adding patches to installation queue and performing prereq checks... Installation queue: The following patches will be rolled back: 30593149 (DATABASE JAN 2020 RELEASE UPDATE 12.2.0.1.200114) Nothing to apply Installing patches... Patch installation complete. Total patches installed: 1 Validating logfiles... Patch 30593149 rollback: SUCCESS logfile: /u01/app/oracle/product/12.2.0/dbhome_1_oem/cfgtoollogs/sqlpatch/30593149/23299902/30593149_rollback_OEM02_2020Feb29_23_24_21.log (no errors) SQL Patching tool complete on Sat Feb 29 23:26:40 2020 [oracle@oemserver 30593149]$ sqlplus / as sysdba SQL> set lines 200 SQL> set pages 200 SQL> col DESCRIPTION for a70 SQL> SELECT patch_id,DESCRIPTION,version, status, bundle_id, bundle_series FROM dba_registry_sqlpatch; PATCH_ID DESCRIPTION VERSION STATUS BUNDLE_ID BUNDLE_SERIES ---------- ---------------------------------------------------------------------- -------------------- ------------------------- ---------- ------------------------------ 30593149 DATABASE JAN 2020 RELEASE UPDATE 12.2.0.1.200114 12.2.0.1 SUCCESS 200114 DBRU
If you are getting the error related to extjob0 and opatch has warning.
OPatch found the word "error" in the stderr of the make command. Please look at this stderr. You can re-run this make command. Stderr output: chmod: changing permissions of ‘/u01/app/oracle/product/12.2.0/dbhome_1/bin/extjobO’: Operation not permitted make: [iextjob] Error 1 (ignored) Patch 30593149 successfully applied. OPatch Session completed with warnings.
Then you need to rollback the patch and re-apply the patch. It will resolve your error.
[oracle@oemserver 30593149]$ opatch rollback -id 30593149 [oracle@oemserver 30593149]$ opatch apply -silent
Thank you for giving your valuable time to read the above information.
If you want to be updated with all our articles send us the Invitation or Follow us:
Telegram Channel: https://t.me/helporacle
Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/
LinkedIn Group: Oracle Cloud DBAAS
Facebook Page: OracleHelp