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.

Index

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

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 18.0.0.0.0 - Production on Wed Jun 20 23:52:13 2018
Version 18.2.0.0.0

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

Connected to an idle instance.

startup
alter pluggable database all open;
exit

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

@/home/oracle/scripts/check_patches.sql
exit

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