Apply Latest PSU Patch (October 2020) on 12c Grid Infrastructure step by step

 In this article we have a discussion how to apply latest PSU patch (October 2020) on single node 12c grid infrastructure.

Steps of the latest PSU patch apply process on grid 12c are as follows.

  1. Patch Installation Prerequisites
  2. One-off Patch Conflict Detection and Resolution
  3. Opatchauto

Step 1. Patch Installation Prerequisites

It is highly recommended to take a backup of the ORACLE_HOME binaries, the Grid_Home binaries, and Central Inventory prior to applying patches. Besides, you must need to go through the README.html which located in patch file.

a. We take Grid_Home and Oracle_Home backup using below command

cd $ORACLE_HOME for grid owner

tar -cvf grid_home.tgz /u03/backup (/u03/backup -- backup location)

b. OPatch utility information

We must use the OPatch utility version 12.2.0.1.21 or later to apply this patch. Oracle always recommends that you use the latest released OPatch version for 12.2 releases.


using following command check OPatch utility version

cd $GRID_HOME/OPatch

[grid@oracleasm OPatch]$ ./opatch version

OPatch Version: 12.2.0.1.21

c. Patch detail check using following command

[grid@oracleasm OPatch]$ ./opatch lsinventory

Oracle Interim Patch Installer version 12.2.0.1.6

Copyright (c) 2020, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/12.2.0/grid

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/12.2.0/grid/oraInst.loc

OPatch version    : 12.2.0.1.6

OUI version       : 12.2.0.1.4

Log file location : /u01/app/12.2.0/grid/cfgtoollogs/opatch/opatch2020-12-15_22-00-39PM_1.log

Lsinventory Output file location : /u01/app/12.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2020-12-15_22-00-39PM.txt

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

Local Machine Information::

Hostname: oracleasm

ARU platform id: 226

ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Grid Infrastructure 12c                                       12.2.0.1.0

There are 1 products installed in this Oracle Home.

There are no Interim patches installed in this Oracle Home.

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

OPatch succeeded.

Note: Above output showing no patch was applied.

d. Download and unzip the patch

We download the latest CPU patch for grid 12c from oracle support site then upload the patch into the server and unzip the patch before applying

unzip p31716471_122010_Linux-x86-64.zip 

here we updated the patch file in /u03 directory


Step 2. One-off Patch Conflict Detection and Resolution

a. Run OPatch Conflict Check

Determine whether any currently installed one-off patches conflict with this patch 31716471 as follows:

For Grid Infrastructure home, as home user:

Example:

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/31716471/31666944

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/31716471/31701753

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/31716471/31245159

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/31716471/26839277

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir <UNZIPPED_PATCH_LOCATION>/31716471/31805785

Go to cd $GRID_HOME/OPatch

[grid@oracleasm OPatch]$ ./opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u03/31716471/31701753 (/u03 is the patch unzip location)

Oracle Interim Patch Installer version 12.2.0.1.23

Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12.2.0/grid

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/12.2.0/grid/oraInst.loc

OPatch version    : 12.2.0.1.23

OUI version       : 12.2.0.1.4

Log file location : /u01/app/12.2.0/grid/cfgtoollogs/opatch/opatch2020-12-18_08-03-15AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

[grid@oracleasm OPatch]$ ./opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u03/31716471/31666944

Oracle Interim Patch Installer version 12.2.0.1.23

Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12.2.0/grid

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/12.2.0/grid/oraInst.loc

OPatch version    : 12.2.0.1.23

OUI version       : 12.2.0.1.4

Log file location : /u01/app/12.2.0/grid/cfgtoollogs/opatch/opatch2020-12-18_08-03-31AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

[grid@oracleasm OPatch]$ ./opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u03/31716471/31805785

Oracle Interim Patch Installer version 12.2.0.1.23

Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12.2.0/grid

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/12.2.0/grid/oraInst.loc

OPatch version    : 12.2.0.1.23

OUI version       : 12.2.0.1.4

Log file location : /u01/app/12.2.0/grid/cfgtoollogs/opatch/opatch2020-12-18_08-04-03AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

[grid@oracleasm OPatch]$ ./opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u03/31716471/31245159

Oracle Interim Patch Installer version 12.2.0.1.23

Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12.2.0/grid

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/12.2.0/grid/oraInst.loc

OPatch version    : 12.2.0.1.23

OUI version       : 12.2.0.1.4

Log file location : /u01/app/12.2.0/grid/cfgtoollogs/opatch/opatch2020-12-18_08-04-25AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

[grid@oracleasm OPatch]$ ./opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u03/31716471/26839277

Oracle Interim Patch Installer version 12.2.0.1.23

Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12.2.0/grid

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/12.2.0/grid/oraInst.loc

OPatch version    : 12.2.0.1.23

OUI version       : 12.2.0.1.4

Log file location : /u01/app/12.2.0/grid/cfgtoollogs/opatch/opatch2020-12-18_08-04-44AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

b. Another way to check patch conflict detection

The following commands check for conflicts in both the 12.2 GI home 

In case you are applying the patch, run this command:

#GRID_HOME/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/31716471 -analyze

cd $GRID_HOME/OPatch

./opatchauto apply /u02/31716471 -analyze


Step 3. opatchauto

The utility must be executed by an operating system (OS) user with root privileges.

Our environmnent is sinle node 12c grid infrastructure.

## To patch only the GI home:

./opatchauto apply <UNZIPPED_PATCH_LOCATION>/31716471 -oh <GI_HOME>

Note: /u01/app/12.2.0/grid is GRID_HOME, /u03/31716471 is patch unzip location

[root@oracleasm OPatch]# ./opatchauto apply /u03/31716471 -oh /u01/app/12.2.0/grid   

OPatchauto session is initiated at Fri Dec 18 08:05:35 2020

System initialization log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchautodb/systemconfig2020-12-18_08-05-46AM.log.

Session log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/opatchauto2020-12-18_08-05-58AM.log

The id for this session is XS9E

Executing OPatch prereq operations to verify patch applicability on home /u01/app/12.2.0/grid

Patch applicability verified successfully on home /u01/app/12.2.0/grid

Executing patch validation checks on home /u01/app/12.2.0/grid

Patch validation checks successfully completed on home /u01/app/12.2.0/grid

Bringing down CRS service on home /u01/app/12.2.0/grid

Prepatch operation log file location: /u01/app/12.2.0/crsdata/oracleasm/crsconfig/hapatch_2020-12-18_08-07-56AM.log

CRS service brought down successfully on home /u01/app/12.2.0/grid

Start applying binary patch on home /u01/app/12.2.0/grid

Binary patch applied successfully on home /u01/app/12.2.0/grid

Starting CRS service on home /u01/app/12.2.0/grid

Postpatch operation log file location: /u01/app/12.2.0/crsdata/oracleasm/crsconfig/hapatch_2020-12-18_08-27-28AM.log

CRS service started successfully on home /u01/app/12.2.0/grid

OPatchAuto successful.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:oracleasm

SIHA Home:/u01/app/12.2.0/grid

Version:12.2.0.1.0

Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /u03/31716471/26839277

Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-12-18_08-08-30AM_1.log

Patch: /u03/31716471/31245159

Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-12-18_08-08-30AM_1.log

Patch: /u03/31716471/31666944

Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-12-18_08-08-30AM_1.log

Patch: /u03/31716471/31701753

Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-12-18_08-08-30AM_1.log

Patch: /u03/31716471/31805785

Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-12-18_08-08-30AM_1.log

OPatchauto session completed at Fri Dec 18 08:28:03 2020

Time taken to complete the session 22 minutes, 29 seconds

## After apply patch check the patch detail

cd $GRID_HOME/OPatch

[grid@oracleasm OPatch]$ ./opatch lsinventory

Oracle Interim Patch Installer version 12.2.0.1.23

Copyright (c) 2020, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/12.2.0/grid

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/12.2.0/grid/oraInst.loc

OPatch version    : 12.2.0.1.23

OUI version       : 12.2.0.1.4

Log file location : /u01/app/12.2.0/grid/cfgtoollogs/opatch/opatch2020-12-18_08-32-07AM_1.log

Lsinventory Output file location : /u01/app/12.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2020-12-18_08-32-07AM.txt

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

Local Machine Information::

Hostname: oracleasm

ARU platform id: 226

ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Grid Infrastructure 12c                                       12.2.0.1.0

There are 1 products installed in this Oracle Home.

Interim patches (5) :

Patch  31805785     : applied on Fri Dec 18 08:27:21 BDT 2020

Unique Patch ID:  23780852

     .....................

     Patch  31666944     : applied on Fri Dec 18 08:22:20 BDT 2020

Unique Patch ID:  23856314

Patch description:  "Database Jul 2020 Release Update Revision : 12.2.0.1.201020 (31666944)"

   Created on 12 Oct 2020, 04:01:43 hrs PST8PDT

   Bugs fixed:

    ...

    ...

OPatch succeeded.

Note: Please perform the GI patch first in test server before applying in production environment.

Done!

Post a Comment

0 Comments

3