In this post, we are going to apply bug fix patch for testing in Oracle 18c Database. First of all, we can download latest opatch utility from support.

  • Doc ID 274526.1 -> How To Download And Install The Latest OPatch (6880880) Version.

Check the version from new OPatch utility.

[oracle@18c ~]$ opatch version
OPatch Version: 12.2.0.1.11

OPatch succeeded.
[oracle@18c 20082081]$

Now we are going to set proper home and check the lsinventory

[oracle@18c 27569451]$ export ORACLE_HOME=/u01/app/oracle/product/18.0.0.0/db_1/
[oracle@18c 27569451]$ export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$PATH
[oracle@18c 27569451]$ opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.11
Copyright (c) 2018, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/18.0.0.0/db_1
Central Inventory : /u01/app/oraInventory1
from : /u01/app/oracle/product/18.0.0.0/db_1//oraInst.loc
OPatch version : 12.2.0.1.11
OUI version : 12.2.0.4.0
Log file location : /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/opatch2018-03-05_02-03-38AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2018-03-05_02-03-38AM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: 18c
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Database 18c 18.0.0.0.0
There are 1 products installed in this Oracle Home.

There are no Interim patches installed in this Oracle Home.

--------------------------------------------------------------------------------

OPatch succeeded.
[oracle@18c 27569451]$

Conflict Detection and Resolution

The easiest and quickest way to determine if you have a patch already applied that will conflict with another patch that will still be applied is through the One-off Patch ConflictDetectionandResolution method.

If no conflict is found you can apply the patch, otherwise you need to resolve the conflicts.

[oracle@18c 27569451]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir .
Oracle Interim Patch Installer version 12.2.0.1.11
Copyright (c) 2018, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/oracle/product/18.0.0.0/db_1
Central Inventory : /u01/app/oraInventory1
from : /u01/app/oracle/product/18.0.0.0/db_1//oraInst.loc
OPatch version : 12.2.0.1.11
OUI version : 12.2.0.4.0
Log file location : /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/opatch2018-03-05_02-18-24AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@18c 27569451]$

Applying the Patch in the Database Home

The OPatch utility automates the patch application for Oracle Grid Infrastructure Home and Oracle RAC Database Home. It operates by consulting the existing configuration and automating the steps required to patch both DB Home and GI Home.

Note: This is just a bug fix patch.

[oracle@18c 27569451]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.11
Copyright (c) 2018, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/18.0.0.0/db_1
Central Inventory : /u01/app/oraInventory1
from : /u01/app/oracle/product/18.0.0.0/db_1//oraInst.loc
OPatch version : 12.2.0.1.11
OUI version : 12.2.0.4.0
Log file location : /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/opatch2018-03-05_01-59-15AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 27569451

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.0.0.0/db_1')

Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '27569451' to OH '/u01/app/oracle/product/18.0.0.0/db_1'

Patching component oracle.rdbms, 18.0.0.0.0...

OPatch succeeded.
[oracle@18c 27569451]$

After applying the patch to the DB Home you can consult the list of patches applied using OPatch “lsinvetory”.

[oracle@18c 27569451]$ opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.11
Copyright (c) 2018, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/18.0.0.0/db_1
Central Inventory : /u01/app/oraInventory1
from : /u01/app/oracle/product/18.0.0.0/db_1//oraInst.loc
OPatch version : 12.2.0.1.11
OUI version : 12.2.0.4.0
Log file location : /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/opatch2018-03-05_02-00-02AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2018-03-05_02-00-02AM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: 18c
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Database 18c 18.0.0.0.0
There are 1 products installed in this Oracle Home.

Interim patches (1) :

Patch 27569451 : applied on Mon Mar 05 01:59:26 IST 2018
Unique Patch ID: 21959961
Patch description: "Interim patch for bug 27569451"
Created on 15 Feb 2018, 06:13:51 hrs UTC
Bugs fixed:
27569451

--------------------------------------------------------------------------------

OPatch succeeded.
[oracle@18c 27569451]$

Removing the Database Home Patch

The patch rollback instructions will be different for GI and DB Home. The steps required for rollback in DB Home are listed below.

[oracle@18c 27569451]$ opatch rollback -id 27569451
Oracle Interim Patch Installer version 12.2.0.1.11
Copyright (c) 2018, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/18.0.0.0/db_1
Central Inventory : /u01/app/oraInventory1
from : /u01/app/oracle/product/18.0.0.0/db_1//oraInst.loc
OPatch version : 12.2.0.1.11
OUI version : 12.2.0.4.0
Log file location : /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/opatch2018-03-05_02-01-34AM_1.log

Patches will be rolled back in the following order:
27569451
The following patch(es) will be rolled back: 27569451

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/18.0.0.0/db_1')

Is the local system ready for patching? [y|n]
y
Could not recognize input. Please re-enter.
y
User Responded with: Y

Rolling back patch 27569451...

RollbackSession rolling back interim patch '27569451' from OH '/u01/app/oracle/product/18.0.0.0/db_1'

Patching component oracle.rdbms, 18.0.0.0.0...
RollbackSession removing interim patch '27569451' from inventory

Log file location: /u01/app/oracle/product/18.0.0.0/db_1/cfgtoollogs/opatch/opatch2018-03-05_02-01-34AM_1.log

OPatch succeeded.
[oracle@18c 27569451]$

Stay tuned for More articles on Oracle 18c 

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

Anuradha’s LinkedIn: Anuradha’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.