In this part of my blog post series about upgrading from Oracle 126.96.36.199 to Oracle 18c I’d like to demonstrate patching Oracle Database 18.1.0 to 18.2.0 on premises.
A while ago I showed also how to patch from Oracle 18.1.0 to 18.2.0 in the Oracle Cloud.
Find the related blog posts here:
- Deinstalling Oracle Database 188.8.131.52
- Installing Oracle Database 18.1.0
- Patching Oracle 18.1.0 to 18.2.0
- Upgrade Oracle 184.108.40.206 to Oracle Database 18c on-premises
Patching Oracle Database 18.1.0 to 18.2.0 on premises
Before I can start patching to the Release Update Oracle 18.2.0 I need to download the patch and a new version of Opatch as well. To install the Database Apr 2018 Release Update 220.127.116.11.180417 patch, the Oracle home must have the 18.1 Database installed.But the patch readme for the 18.2.0 Update tells me as well to download Opatch at least in version 18.104.22.168.13.
You must use the OPatch utility version 22.214.171.124.13 or later to apply this patch. Oracle recommends that you use the latest released OPatch version for 12.2, which is available for download from My Oracle Support patch 6880880 by selecting the 126.96.36.199.0 release.
You can either grab the 12.2.0. or the 18.0.0 version of OPatch. Both downloads are identical. Download it via this link: 6880880
Installing OPatch 18.0.0
The readme of OPatch gives me the following installation instructions:
To install this patch, Please extract the file "zipped file" using unzip or winzip, depending upon the platform. You should extract the zip file directly under the ORACLE_HOME. Please follow the following steps for extracting the zip file of OPatch. (1) Please take a backup of ORACLE_HOME/OPatch into a dedicated backup location. (2) Please make sure no directory ORACLE_HOME/OPatch exist. (3) Please unzip the OPatch downloaded zip into ORACLE_HOME directory. To check the version of the opatch utility installed in the above step, go to the OPatch directory and run "opatch version".
To install opatch:
cd $ORACLE_HOME rm -rf OPatch
- Copy the patch file
p6880880_180000_Linux-x86-64.zipto the 18c Oracle Home:
cp p6880880_180000_Linux-x86-64.zip $ORACLE_HOME
- Unzip it – it will create the new OPatch directory:
- Check the version:
cd OPatch ./opatch version OPatch Version: 188.8.131.52.13 OPatch succeeded.
- Clean up:
cd $ORACLE_HOME rm p6880880_180000_Linux-x86-64.zip
Just by the way, you can use the same
opatch tool to apply patches to Oracle 184.108.40.206 homes as well. And see also why you should always use the newest and most recent opatch.
Installing the April 2018 Update (18.2.0) for Oracle 18
I downloaded patch 27676517, the April 2018 Update (RU) for Oracle Database 18 and copy the zip file
p27676517_180000_Linux-x86-64.zip into my
/home/oracle into a subdirectory.and unzip it.
cp p27676517_180000_Linux-x86-64.zip /home/oracle/182 cd /home/oracle/182 unzip p27676517_180000_Linux-x86-64.zip rm p27676517_180000_Linux-x86-64.zip cd 27676517
First step I’ll have to do is the conflict check:
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./ Oracle Interim Patch Installer version 220.127.116.11.13 Copyright (c) 2018, Oracle Corporation. All rights reserved. PREREQ session Oracle Home : /u01/app/oracle/product/18 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/18/oraInst.loc OPatch version : 18.104.22.168.13 OUI version : 22.214.171.124.0 Log file location : /u01/app/oracle/product/18/cfgtoollogs/opatch/opatch2018-06-14_23-31-22PM_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded.
If the check is passed, I can apply the patch now from within the same directory. If the listener runs from the same home it must be stopped as well.
$ORACLE_HOME/OPatch/opatch apply Oracle Interim Patch Installer version 126.96.36.199.13 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/18 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/18/oraInst.loc OPatch version : 188.8.131.52.13 OUI version : 184.108.40.206.0 Log file location : /u01/app/oracle/product/18/cfgtoollogs/opatch/opatch2018-06-14_23-33-12PM_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 27676517 Do you want to proceed? [y|n] y 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/18') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Applying interim patch '27676517' to OH '/u01/app/oracle/product/18' ApplySession: Optional component(s) [ oracle.assistants.usm, 220.127.116.11.0 ] , [ oracle.has.crs, 18.104.22.168.0 ] , [ oracle.network.cman, 22.214.171.124.0 ] , [ oracle.assistants.asm, 126.96.36.199.0 ] not present in the Oracle Home or a higher version is found. Patching component oracle.network.rsf, 188.8.131.52.0... Patching component oracle.rdbms.crs, 184.108.40.206.0... Patching component oracle.assistants.acf, 220.127.116.11.0... Patching component oracle.sqlplus.ic, 18.104.22.168.0... Patching component oracle.rdbms.deconfig, 22.214.171.124.0... Patching component oracle.sqlplus, 126.96.36.199.0... Patching component oracle.rdbms.util, 188.8.131.52.0... Patching component oracle.rdbms, 184.108.40.206.0... Patching component oracle.rdbms.dbscripts, 220.127.116.11.0... Patching component oracle.assistants.deconfig, 18.104.22.168.0... Patching component oracle.assistants.server, 22.214.171.124.0... Patching component oracle.rdbms.install.plugins, 126.96.36.199.0... Patching component oracle.rdbms.rsf, 188.8.131.52.0... Patching component oracle.rdbms.rman, 184.108.40.206.0... Patching component oracle.javavm.client, 220.127.116.11.0... Patching component oracle.ldap.owm, 18.104.22.168.0... Patching component oracle.ldap.security.osdt, 22.214.171.124.0... Patch 27676517 successfully applied. Log file location: /u01/app/oracle/product/18/cfgtoollogs/opatch/opatch2018-06-14_23-33-12PM_1.log OPatch succeeded.
If you plan to patch an existing Oracle 18.1.0 database to 18.2.0, then datapatch must be performed in order to apply the necessary SQL changes. If you upgrade from a release before 18.1.0 to Oracle 18.2.0, then no other actions are necessary here.
Datapatch in case you patch an existing database
To execute datapatch, the database needs to be started first (and the listener).
$ $ORACLE_HOME/OPatch/datapatch -verbose SQL Patching tool version 126.96.36.199.0 Production on Thu Jun 14 23:46:27 2018 Copyright (c) 2012, 2018, Oracle. All rights reserved. Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_6801_2018_06_14_23_46_27/sqlpatch_invocation.log Connecting to database...OK Gathering database info...done Note: Datapatch will only apply or rollback SQL fixes for PDBs that are in an open state, no patches will be applied to closed PDBs. Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation (Doc ID 1585822.1) Bootstrapping registry and package to current versions...done Determining current state...done Current state of interim SQL patches: No interim patches found Current state of release update SQL patches: Binary registry: 188.8.131.52.0 Release_Update 1804041635: Installed PDB CDB$ROOT: No release update patches installed PDB PDB$SEED: No release update patches installed Adding patches to installation queue and performing prereq checks...done Installation queue: For the following PDBs: CDB$ROOT PDB$SEED No interim patches need to be rolled back Patch 27676517 (Database Release Update : 184.108.40.206.180417 (27676517)): Apply from 220.127.116.11.0 Feature Release to 18.104.22.168.0 Release_Update 1804041635 No interim patches need to be applied Installing patches... Patch installation complete. Total patches installed: 2 Validating logfiles...done Patch 27676517 apply (pdb CDB$ROOT): SUCCESS logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/27676517/22097537/27676517_apply_CDB2_CDBROOT_2018Jun14_23_46_53.log (no errors) Patch 27676517 apply (pdb PDB$SEED): SUCCESS logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/27676517/22097537/27676517_apply_CDB2_PDBSEED_2018Jun14_23_47_59.log (no errors) SQL Patching tool complete on Thu Jun 14 23:48:32 2018
At last, a final patch verification:
ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS BUNDLE_SER -------------------- ---------- -------------------- ---------- ---------- ------------------------------ ---------- 14-JUN-2018 17:31:26 VIEW INVAL 8289601 view invalidation IDATE 14-JUN-2018 17:31:35 UPGRADE SERVER 22.214.171.124.0 Upgraded from 126.96.36.199.0 to 18 .188.8.131.52 14-JUN-2018 23:47:51 RU_APPLY SERVER 184.108.40.206.0 Patch applied from 220.127.116.11.0 to 18.104.22.168.0 BOOTSTRAP DATAPATCH 18 RDBMS_22.214.171.124.0DBRU_LINUX.X64 _180403 BOOTSTRAP DATAPATCH 126.96.36.199 RDBMS_188.8.131.52.0DBAPR2018RU_LI NUX.X64_180329