Patching Oracle Database 18.1.0 to 18.2.0 on premises

In this part of my blog post series about upgrading from Oracle 12.2.0.1 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 18.2.0.0.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 12.2.0.1.13.

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

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:
    cd $ORACLE_HOME
    rm -rf OPatch
  • Copy the patch file p6880880_180000_Linux-x86-64.zip to the 18c Oracle Home:
    cp p6880880_180000_Linux-x86-64.zip $ORACLE_HOME
  • Unzip it – it will create the new OPatch directory:
    unzip p6880880_180000_Linux-x86-64.zip
  • Check the version:
    cd OPatch
    ./opatch version
    
    OPatch Version: 12.2.0.1.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 12.1.0.2 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 12.2.0.1.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    : 12.2.0.1.13
OUI version       : 12.2.0.4.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 12.2.0.1.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    : 12.2.0.1.13
OUI version       : 12.2.0.4.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, 18.0.0.0.0 ] , [ oracle.has.crs, 18.0.0.0.0 ] , [ oracle.network.cman, 18.0.0.0.0 ] , [ oracle.assistants.asm, 18.0.0.0.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.network.rsf, 18.0.0.0.0...

Patching component oracle.rdbms.crs, 18.0.0.0.0...

Patching component oracle.assistants.acf, 18.0.0.0.0...

Patching component oracle.sqlplus.ic, 18.0.0.0.0...

Patching component oracle.rdbms.deconfig, 18.0.0.0.0...

Patching component oracle.sqlplus, 18.0.0.0.0...

Patching component oracle.rdbms.util, 18.0.0.0.0...

Patching component oracle.rdbms, 18.0.0.0.0...

Patching component oracle.rdbms.dbscripts, 18.0.0.0.0...

Patching component oracle.assistants.deconfig, 18.0.0.0.0...

Patching component oracle.assistants.server, 18.0.0.0.0...

Patching component oracle.rdbms.install.plugins, 18.0.0.0.0...

Patching component oracle.rdbms.rsf, 18.0.0.0.0...

Patching component oracle.rdbms.rman, 18.0.0.0.0...

Patching component oracle.javavm.client, 18.0.0.0.0...

Patching component oracle.ldap.owm, 18.0.0.0.0...

Patching component oracle.ldap.security.osdt, 18.0.0.0.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.0.0.0.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:
    18.2.0.0.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 : 18.2.0.0.180417 (27676517)):
      Apply from 18.1.0.0.0 Feature Release to 18.2.0.0.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		     18.0.0.0.0 	   Upgraded from 12.2.0.1.0 to 18
									   .1.0.0.0

14-JUN-2018 23:47:51 RU_APPLY	SERVER		     18.0.0.0.0 	   Patch applied from 18.1.0.0.0
									   to 18.2.0.0.0

		     BOOTSTRAP	DATAPATCH	     18 		   RDBMS_18.2.0.0.0DBRU_LINUX.X64
									   _180403

		     BOOTSTRAP	DATAPATCH	     12.2.0.1		   RDBMS_12.2.0.1.0DBAPR2018RU_LI
									   NUX.X64_180329

Done.

–Mike

 

Share this: