HOL 18c Patch

In this part of the lab you’ll patch the existing Oracle Database 18.1.0 installation with the April 2018 Release Update, Oracle 18.2.0.


Patching Oracle 18c

You will now patch your Oracle Database 18c environment with the Release Update 18.2.0. This is a key task before you upgrade any databases. As there is an 18c database (CDB2) this database will have to be adjusted as well.

Normally you’d have to download and install the most recent version of OPatch and of course the Release Update 18.2.0. Both tasks are completed already in the lab. In case you’d like to see all tasks in detail please read on this blog post after the lab has been completed.

  • OPatch has been installed into: /u01/app/oracle/product/18/OPatch
  • RU 18.2.0 has been stored in: /home/oracle/182/27676517

1. Shutdown database and listener

When we apply the patch we need to shutdown the database and the listener as in the lab the listener is running from the 18.1.0 home.

Open a 2nd xterm. Then switch the environment to . cdb2, change to /home/oracle/182/27676517. Then shutdown the database CDB2 and the listener:

. cdb2
lsnrctl stop

sqlplus / as sysdba

shutdown immediate

2. Conflict Check

Next step you will do a conflict check with OPatch:

cd /home/oracle/182/27676517

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./

The result should say:

Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.

without any errors reported.

3. Apply Release Update 18.2.0

Now apply the patch (Release Upgrade 18.2.0 from April 2018).

$ORACLE_HOME/OPatch/opatch apply

Answer all questions with “y“.

Once the result is “OPatch succeeded.” without any errors reported, all went fine.

Congratulations! You applied the April 2018 Release Update 18.2.0 successfully!

4. Startup Database and Listener

lsnrctl start
sqlplus / as sysdba

Here you should see now 18.2.0 in the SQL*plus banner:

SQL*Plus: Release - Production on Wed Jun 20 23:52:13 2018

Copyright (c) 1982, 2018, Oracle.  All rights reserved.

Connected to an idle instance.

alter pluggable database all open;

5. Apply SQL Changes

Final step now – the patch has SQL changes included which you need to apply to existing databases – in this case to CDB2:

cd /home/oracle/182/27676517
$ORACLE_HOME/OPatch/datapatch -verbose

This will apply all SQL changes to all pluggable databases and the CDB$ROOT.
The datapatch run may take a few minutes.

You should see the following output:

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_2018Jun20_23_56_01.log (no errors)
Patch 27676517 apply (pdb PDB$SEED): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/27676517/22097537/27676517_apply_CDB2_PDBSEED_2018Jun20_23_56_54.log (no errors)
SQL Patching tool complete on Wed Jun 20 23:57:20 2018

Afterwards you completed patching successfully.

Now verify if the 18.2.0 Update has been applied successfully:

cd /home/oracle/scripts
sqlplus / as sysdba


When we do an upgrade later on, the SQL changes of 18.2.0 will be automatically applied during the database upgrade.


===> NEXT: Upgrade the UPGR database

Share this: