In this part of my blog post series about upgrading from Oracle 18.104.22.168 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 22.214.171.124
- Installing Oracle Database 18.1.0
- Patching Oracle 18.1.0 to 18.2.0
- Upgrade Oracle 126.96.36.199 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 188.8.131.52.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 184.108.40.206.13.
You must use the OPatch utility version 220.127.116.11.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 18.104.22.168.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: 22.214.171.124.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 126.96.36.199 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 188.8.131.52.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 : 184.108.40.206.13 OUI version : 220.127.116.11.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 18.104.22.168.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 : 22.214.171.124.13 OUI version : 126.96.36.199.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, 188.8.131.52.0 ] , [ oracle.has.crs, 184.108.40.206.0 ] , [ oracle.network.cman, 220.127.116.11.0 ] , [ oracle.assistants.asm, 18.104.22.168.0 ] not present in the Oracle Home or a higher version is found. Patching component oracle.network.rsf, 22.214.171.124.0... Patching component oracle.rdbms.crs, 126.96.36.199.0... Patching component oracle.assistants.acf, 188.8.131.52.0... Patching component oracle.sqlplus.ic, 184.108.40.206.0... Patching component oracle.rdbms.deconfig, 220.127.116.11.0... Patching component oracle.sqlplus, 18.104.22.168.0... Patching component oracle.rdbms.util, 22.214.171.124.0... Patching component oracle.rdbms, 126.96.36.199.0... Patching component oracle.rdbms.dbscripts, 188.8.131.52.0... Patching component oracle.assistants.deconfig, 184.108.40.206.0... Patching component oracle.assistants.server, 220.127.116.11.0... Patching component oracle.rdbms.install.plugins, 18.104.22.168.0... Patching component oracle.rdbms.rsf, 22.214.171.124.0... Patching component oracle.rdbms.rman, 126.96.36.199.0... Patching component oracle.javavm.client, 188.8.131.52.0... Patching component oracle.ldap.owm, 184.108.40.206.0... Patching component oracle.ldap.security.osdt, 220.127.116.11.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 18.104.22.168.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: 22.214.171.124.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 : 126.96.36.199.180417 (27676517)): Apply from 188.8.131.52.0 Feature Release to 184.108.40.206.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 220.127.116.11.0 Upgraded from 18.104.22.168.0 to 18 .22.214.171.124 14-JUN-2018 23:47:51 RU_APPLY SERVER 126.96.36.199.0 Patch applied from 188.8.131.52.0 to 184.108.40.206.0 BOOTSTRAP DATAPATCH 18 RDBMS_220.127.116.11.0DBRU_LINUX.X64 _180403 BOOTSTRAP DATAPATCH 18.104.22.168 RDBMS_22.214.171.124.0DBAPR2018RU_LI NUX.X64_180329