Apply GI 12.2.0.1.190716 Release Update Revision 2 ( RUR) Patch

This exercise is to apply Patch 29708822 – GI Jan 2019 Release Update Revision 12.2.0.1.190716.

Here is the GI environment to be patched:

GI HOME:  12.2.0.1.190416
DB HOMES: 12.2.0.1.190416

Patches downloaded :

Patch 29708822 - GI Jan 2019 Release Update Revision 12.2.0.1.190716
Patch Number Description Applicable Homes
29708478 Database Jan 2019 Release Update Revision 12.2.0.1.190716 Only DB Home for non-Oracle RAC setup. Both DB Homes and Grid Home for Oracle RAC setup.
29263382 OCW Jan 2019 Release Update Revision 12.2.0.1.190416 Both DB Homes and Grid Home
28864846 ACFS Jan 2019 Release Update 12.2.0.1.190115 Only Grid Home
26839277 DBWLM Release Update 12.2.0.1.170913 Only Grid Home
28566910 Tomcat Release Update 12.2.0.1.0 Only Grid Home

1) Check and install the latest OPatch utility , which should be greater than 12.2.0.1.14 on all RAC nodes .

[grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.18

OPatch succeeded.
[grid@racnode2 ~]$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.18

OPatch succeeded.
[grid@racnode2 ~]$

2) Run OPatch Conflict Check.

First run as GI owner grid user:

[grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29708822/29708478
[grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29708822/29263382
[grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29708822/28864846
[grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29708822/26839277
[grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29708822/28566910

Now run as DB owner grid user:

[oracle@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29708822/29708478
[oracle@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29708822/29263382

3)Run OPatch SystemSpace Check:

Check if enough free space is available on the ORACLE_HOME filesystem for the patches to be applied as given below:

  • For Grid Infrastructure Home, as home user grid:
    1. Create file /tmp/patch_list_gihome.txt with the following content:
      [grid@racnode1 ~]$ cat /tmp/patch_list_gihome.txt
      /media/sf_Software/12201-190115/29708822/29708478
      /media/sf_Software/12201-190115/29708822/29263382
      /media/sf_Software/12201-190115/29708822/28864846
      /media/sf_Software/12201-190115/29708822/26839277
      /media/sf_Software/12201-190115/29708822/28566910
    2. Run the opatch command to check if enough free space is available in the Grid Infrastructure Home:
      [grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
      Oracle Interim Patch Installer version 12.2.0.1.18
      Copyright (c) 2020, Oracle Corporation.  All rights reserved.
      
      PREREQ session
      
      Oracle Home       : /u01/app/12.2.0.1/grid
      Central Inventory : /u01/app/oraInventory
         from           : /u01/app/12.2.0.1/grid/oraInst.loc
      OPatch version    : 12.2.0.1.18
      OUI version       : 12.2.0.1.4
      Log file location : /u01/app/12.2.0.1/grid/cfgtoollogs/opatch/opatch2020-03-07_11-08-09AM_1.log
      
      Invoking prereq "checksystemspace"
      
      Prereq "checkSystemSpace" passed.
      OPatch succeeded.

      For Database home, as home user oracle:

      1. Create file /tmp/patch_list_dbhome.txt with the following content:
        [oracle@racnode1 ~]$ cat /tmp/patch_list_dbhome.txt
        /media/sf_Software/12201-190115/29708822/29708478
        /media/sf_Software/12201-190115/29708822/29263382
        [oracle@racnode1 ~]$
        
      2. Run opatch command to check if enough free space is available in the Database Home:
        [oracle@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
        Oracle Interim Patch Installer version 12.2.0.1.18
        Copyright (c) 2020, Oracle Corporation.  All rights reserved.
        
        PREREQ session
        
        Oracle Home       : /u01/app/oracle/product/12.2.0/dbhome_1
        Central Inventory : /u01/app/oraInventory
           from           : /u01/app/oracle/product/12.2.0/dbhome_1/oraInst.loc
        OPatch version    : 12.2.0.1.18
        OUI version       : 12.2.0.1.4
        Log file location : /u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/opatch/opatch2020-03-07_11-11-23AM_1.log
        
        Invoking prereq "checksystemspace"
        
        Prereq "checkSystemSpace" passed.
        
        OPatch succeeded.
        [oracle@racnode1 ~]$

4) Check for conflicts in both the 12.2.0.1 GI home and the 12.2.0.1 DB homes.

  • In case you are applying the patch, run this command:
    [root@racnode1 ~]# /u01/app/12.2.0.1/grid/OPatch/opatchauto apply /media/sf_Software/12201-190115/29708822 -analyze 
    [root@racnode1 ~]#
  • In case you are rolling back the patch, run this command:
    #/u01/app/12.2.0.1/grid/OPatch/opatchauto rollback /media/sf_Software/12201-190115/29708822 -analyze
    
    

5) Patch both 12.2.0.2 GI and 12.2.0.1 DB home by running “opatchauto” as root user.

[root@racnode1 ~]# /u01/app/12.2.0.1/grid/OPatch/opatchauto  
                apply /media/sf_Software/12201-190115/29708822

6) Please repeat step 1 to 5 on node 2.

7)Run “datapatch” or post patch SQL as per instructions, if ‘opatchauto’ is not used. In this situation, this step is not required because we have used opatchauto to patch both GI and DB HOME.

On the node was last patched, check the log. Please note if a PDB is not OPEN,  the post patch SQL will not be applied onto this PDB, it has to be manually applied later.

[root@racnode2 ~]# ls -ltr /u01/app/oracle/cfgtoollogs/sqlpatch/29708478/22988073
total 14120
-rw-r--r-- 1 oracle oinstall 4783857 Mar  7 12:08 29708478_apply_RACTESTB_CDBROOT_2020Mar07_12_07_58.log
-rw-r--r-- 1 oracle oinstall 4833929 Mar  7 12:11 29708478_apply_RACTESTB_RACTESTBPDB_2020Mar07_12_10_08.log
-rw-r--r-- 1 oracle oinstall 4833925 Mar  7 12:11 29708478_apply_RACTESTB_PDBSEED_2020Mar07_12_10_10.log
[root@racnode2 ~]#

8) Check the patches applied.

a) Run ‘opatch lsinventory’ against both GI and DB homes.

As GI Home owner grid user:

[grid@racnode1]$ opatch lsinventory
...
..
Oracle Grid Infrastructure 12c                                       12.2.0.1.0
There are 1 products installed in this Oracle Home.


Interim patches (5) :

Patch  29708478     : applied on Sat Mar 07 11:28:36 AEDT 2020
Unique Patch ID:  22988073
Patch description:  "Database Jan 2019 Release Update Revision : 12.2.0.1.190716 (29708478)"
   Created on 26 Jun 2019, 03:34:53 hrs PST8PDT
   Bugs fixed:
     8480838, 8932139, 13554903, 14221306, 14690846, 15931756, 16002385

As DB Home owner oracle user:

[oracle@racnode1]$ opatch lsinventory
..
..
Oracle Database 12c 12.2.0.1.0
There are 1 products installed in this Oracle Home.


Interim patches (2) :

Patch 29708478 : applied on Sat Mar 07 11:27:44 AEDT 2020
Unique Patch ID: 22988073
Patch description: "Database Jan 2019 Release Update Revision : 12.2.0.1.190716 (29708478)"
Created on 26 Jun 2019, 03:34:53 hrs PST8PDT
Bugs fixed:
...
..

b) Query database .

SQL>  select PATCH_ID, VERSION, ACTION, STATUS, DESCRIPTION 
      from dba_registry_sqlpatch;

  PATCH_ID VERSION              ACTION          STATUS                    DESCRIPTION
---------- -------------------- --------------- ------------------------- ----------------------------------------------------------------------------------------------------
  28822515 12.2.0.1             APPLY           SUCCESS                   DATABASE JAN 2019 RELEASE UPDATE 12.2.0.1.190115
  28822515 12.2.0.1             ROLLBACK        SUCCESS                   DATABASE JAN 2019 RELEASE UPDATE 12.2.0.1.190115
  29230950 12.2.0.1             APPLY           SUCCESS                   DATABASE JAN 2019 RELEASE UPDATE REVISION 12.2.0.1.190416
  29230950 12.2.0.1             ROLLBACK        SUCCESS                   DATABASE JAN 2019 RELEASE UPDATE REVISION 12.2.0.1.190416
  29708478 12.2.0.1             APPLY           SUCCESS                   DATABASE JAN 2019 RELEASE UPDATE REVISION 12.2.0.1.190716

9) Recompile invalid objects if any.

SQL> select owner, count(*) 
     from dba_objects 
     where status!='VALID' group by owner;

no rows selected

If the OJVM RU or RUR is also installed, you may see invalid objects after execution of datapatch in the previous step. If this is the case, run utlrp.sql to re-validate these objects.

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

Apply GI 12.2.0.1.190416 Release Update Revision 1 ( RUR) Patch

This exercise is to apply patch 29231084 – GI Jan 2019 Release Update Revision 12.2.0.1.190416

Here is the GI environment to be patched:

GI HOME:  12.2.0.1.190115
DB HOMES: 12.2.0.1.190115

Patches downloaded :

Patch 29231084 - GI Jan 2019 Release Update Revision 12.2.0.1.190416
29230950 Database Jan 2019 Release Update Revision 12.2.0.1.190416 Only DB Home for non-Oracle RAC setup. Both DB Homes and Grid Home for Oracle RAC setup.
29263382 OCW Jan 2019 Release Update Revision 12.2.0.1.190416 Both DB Homes and Grid Home
28864846 ACFS Jan 2019 Release Update 12.2.0.1.190115 Only Grid Home
26839277 DBWLM Release Update 12.2.0.1.170913 Only Grid Home
28566910 Tomcat Release Update 12.2.0.1.0 Only Grid Home

1) Check and install the latest OPatch utility , which should be greater than 12.2.0.1.14 on all RAC nodes .

[grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.18

OPatch succeeded.
[grid@racnode2 ~]$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.18

OPatch succeeded.
[grid@racnode2 ~]$

2) Run OPatch Conflict Check.

First run as GI owner grid user:

[grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29231084/29230950
[grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29231084/29263382
[grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29231084/28864846
[grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29231084/26839277
[grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29231084/28566910

Now run as DB owner grid user:

[oracle@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29231084/29230950 
[oracle@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_Software/12201-190115/29231084/29263382

3)Run OPatch SystemSpace Check:

Check if enough free space is available on the ORACLE_HOME filesystem for the patches to be applied as given below:

  • For Grid Infrastructure Home, as home user grid:
    1. Create file /tmp/patch_list_gihome.txt with the following content:
      % cat /tmp/patch_list_gihome.txt
      
      [grid@racnode1 ~]$ cat /tmp/patch_list_gihome.txt
      /media/sf_Software/12201-190115/29231084/29230950
      /media/sf_Software/12201-190115/29231084/29263382
      /media/sf_Software/12201-190115/29231084/28864846
      /media/sf_Software/12201-190115/29231084/26839277
      /media/sf_Software/12201-190115/29231084/28566910
    2. Run the opatch command to check if enough free space is available in the Grid Infrastructure Home:
      [grid@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
      ...
      ..
      .
      Invoking prereq "checksystemspace"
      
      Prereq "checkSystemSpace" passed.
      
      OPatch succeeded.
      [grid@racnode1 ~]$

      For Database home, as home user oracle:

      1. Create file /tmp/patch_list_dbhome.txt with the following content:
        [oracle@racnode1 ~]$ cat /tmp/patch_list_dbhome.txt
        /media/sf_Software/12201-190115/29231084/29230950
        /media/sf_Software/12201-190115/29231084/29263382
        [oracle@racnode1 ~]$
        
      2. Run opatch command to check if enough free space is available in the Database Home:
        [oracle@racnode1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
        ...
        ..
        .
        Invoking prereq "checksystemspace"
        
        Prereq "checkSystemSpace" passed.
        
        OPatch succeeded.
        [oracle@racnode1 ~]$

4) Check for conflicts in both the 12.2.0.1 GI home and the 12.2.0.1 DB homes.

  • In case you are applying the patch, run this command:
    [root@racnode1 ~]# /u01/app/12.2.0.1/grid/OPatch/opatchauto apply /media/sf_Software/12201-190115/29231084 -analyze
    
    [root@racnode1 ~]#
  • In case you are rolling back the patch, run this command:
    #/u01/app/12.2.0.1/grid/OPatch/opatchauto rollback /media/sf_Software/12201-190115/29231084 -analyze
    
    

5) Patch both 12.2.0.2 GI and 12.2.0.1 DB home by running “opatchauto” as root user.

[root@racnode1 ~]# /u01/app/12.2.0.1/grid/OPatch/opatchauto  
                apply /media/sf_Software/12201-190115/29231084

6) Please repeat step 1 to 5 on node 2.

7)Run “datapatch” or post patch SQL as per instructions, if ‘opatchauto’ is not used. In this situation, this step is not required because we have used opatchauto to patch.

On the node was last patched, check the log :

[root@racnode2 ~]# [oracle@racnode2 OPatch]$  ls -ltr /u01/app/oracle/cfgtoollogs/sqlpatch/29230950/22819305/
total 9720
-rw-r--r-- 1 oracle oinstall 4587177 Mar  5 22:36 29230950_apply_RACTESTB_CDBROOT_2020Mar05_22_36_00.log
-rw-r--r-- 1 oracle oinstall 4833931 Mar  5 22:38 29230950_apply_RACTESTB_PDBSEED_2020Mar05_22_37_21.log
-rw-r--r-- 1 oracle oinstall  527239 Mar  5 23:01 29230950_apply_RACTESTB_RACTESTBPDB_2020Mar05_23_00_55.log

8) Check the patches applied.

a) Run ‘opatch lsinventory’ against both GI and DB homes.

As GI Home owner grid user:

[grid@racnode1]$ opatch lsinventory
...
..
Interim patches (5) :
Patch  29263382     : applied on Thu Mar 05 22:12:49 AEDT 2020
Unique Patch ID:  22704686
Patch description:  "OCW JAN 2019 RELEASE UPDATE REVISION 12.2.0.1.190416 (29263382)"
   Created on 18 Mar 2019, 04:41:32 hrs PST8PDT
   Bugs fixed:
     12816839, 13250991, 18701017, 20559126, 21477269, 21679331, 22322021
     22734786, 22986384, 22999793, 23170674, 23297046, 23301767, 23340259

As DB Home owner oracle user:

[oracle@racnode1]$ opatch lsinventory
..
..
Interim patches (2) :

Patch  29263382     : applied on Thu Mar 05 22:11:30 AEDT 2020
Unique Patch ID:  22704686
Patch description:  "OCW JAN 2019 RELEASE UPDATE REVISION 12.2.0.1.190416 (29263382)"
   Created on 18 Mar 2019, 04:41:32 hrs PST8PDT
   Bugs fixed:
     12816839, 13250991, 18701017, 20559126, 21477269, 21679331, 22322021
     22734786, 22986384, 22999793, 23170674, 23297046, 23301767, 23340259

...
..
Patch  29230950     : applied on Thu Mar 05 22:11:00 AEDT 2020
Unique Patch ID:  22819305
Patch description:  "Database Jan 2019 Release Update Revision : 12.2.0.1.190416 (29230950)"
   Created on 22 Mar 2019, 04:35:49 hrs PST8PDT
   Bugs fixed:

b) Query database .

SQL> select PATCH_ID, VERSION, ACTION, STATUS, DESCRIPTION 
     from dba_registry_sqlpatch;
SQL> select PATCH_ID, VERSION, ACTION, STATUS, DESCRIPTION 
     from dba_registry_sqlpatch;

  PATCH_ID VERSION              ACTION          STATUS    DESCRIPTION
---------- -------------------- --------------- --------- ------------------------------------------------------------
  28822515 12.2.0.1             APPLY           SUCCESS   DATABASE JAN 2019 RELEASE UPDATE 12.2.0.1.190115
  28822515 12.2.0.1             ROLLBACK        SUCCESS   DATABASE JAN 2019 RELEASE UPDATE 12.2.0.1.190115
  29230950 12.2.0.1             APPLY           SUCCESS   DATABASE JAN 2019 RELEASE UPDATE REVISION 12.2.0.1.190416


9) Recompile invalid objects if any.

SQL> select owner, count(*) 
     from dba_objects 
     where status!='VALID' group by owner;

no rows selected

If the OJVM RU or RUR is also installed, you may see invalid objects after execution of datapatch in the previous step. If this is the case, run utlrp.sql to re-validate these objects.

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

Oracle Updates and Revisions Patching Path

RU/RUR Update/Revision

From  release 12.2.0.1, “Release Update” ( RU)  and ” Release Update Revision” ( RUR)  are released, which replace the legacy PSUs and Proactive Bundle ( PB ) Patches.

From release 18 onwards, the terms ‘Update‘ and ‘Revision‘ are used instead of “Release Update” ( RU ) and ” Release Update Revision”( RUR ) in 12.2.0.1.

Oracle release pattern of Updates and Releases

Oracle release pattern of Updates and Releases
Oracle release pattern of Updates and Releases

Updates and Revisions Patching Path

Updates and Revisions Patching Path
Updates and Revisions Patching Path

The patching path is either :

  • Vertically upward
  • Progressive diagonal
  • Progressive straight.

From an Update, the patching direction should be to either its 2 Revisions, released in consecutive quarters, OR the next quarter’s Update. There is no moving backward or vertical down.

If database is at Update 18.3.0 at the moment, the possible patching path could be :

Update 18.3.0  -> Revisions 18.3.1 , 18.3.2, 18.4.1 and so on
                              or
Update 18.3.0 ->  Updates 18.4.0 , 18.5.0 and so on

Below patching path is NOT supported, because backward patching is non-cumulative. There is no moving back to earlier Release’s Updates and Revisions.

Update 18.3.0 -> Revisions 18.2.1 or 18.2.2 OR to Update 18.2.0

If database is at Revision 18.2.2 at the moment, the possible patching path could be :

Revision 18.2.2 -> Revisions 18.3.1 , 18.3.2, 18.4.1 and so on
                    or
Revision 18.2.2 -> Updates 18.4.0 , 18.5.0 and so on.

Below patching path is NOT supported, Because Update 18.3.0 is non-cumulative to 18.2.2.

Revision 18.2.2 -> Revision 18.2.1 or to Update 18.3.0