Patching Oracle Database 18.1.0 to 18.2.0 on premises

In this part of my blog post series about upgrading from Oracle to Oracle 18c I’d like to demonstrate patching Oracle Database 18.1.0 to 18.2.0 on premises.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:

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 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

You must use the OPatch utility version 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 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

Patching Oracle Database 18.1.0 to 18.2.0 on premises

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:

  • Remove $ORACLE_HOME/OPatch:
    rm -rf OPatch
  • Copy the patch file to the 18c Oracle Home:
  • Unzip it – it will create the new OPatch directory:
  • Check the version:
    cd OPatch
    ./opatch version
    OPatch Version:
    OPatch succeeded.
  • Clean up:

Just by the way, you can use the same opatch tool to apply patches to Oracle 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 into my /home/oracle into a subdirectory.and unzip it.

cp /home/oracle/182
cd /home/oracle/182
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
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    :
OUI version       :
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
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    :
OUI version       :
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]
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]
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, ] , [, ] , [, ] , [ oracle.assistants.asm, ]  not present in the Oracle Home or a higher version is found.

Patching component,

Patching component,

Patching component oracle.assistants.acf,

Patching component oracle.sqlplus.ic,

Patching component oracle.rdbms.deconfig,

Patching component oracle.sqlplus,

Patching component oracle.rdbms.util,

Patching component oracle.rdbms,

Patching component oracle.rdbms.dbscripts,

Patching component oracle.assistants.deconfig,

Patching component oracle.assistants.server,

Patching component oracle.rdbms.install.plugins,

Patching component oracle.rdbms.rsf,

Patching component oracle.rdbms.rman,

Patching component oracle.javavm.client,

Patching component oracle.ldap.owm,

Patching component,
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 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: Release_Update 1804041635: Installed
    No release update patches installed
    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 : (27676517)):
      Apply from Feature Release to 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:

-------------------- ---------- -------------------- ---------- ---------- ------------------------------ ----------
14-JUN-2018 17:31:26 VIEW INVAL 				   8289601 view invalidation

14-JUN-2018 17:31:35 UPGRADE	SERVER 	   Upgraded from to 18

14-JUN-2018 23:47:51 RU_APPLY	SERVER 	   Patch applied from

		     BOOTSTRAP	DATAPATCH	     18 		   RDBMS_18.





Share this: