Oracle: PSU and CPU Patching for Oracle Databases (11.2.0.4 – Oracle Linux)

Oracle: PSU and CPU patching for Oracle Databases (11.2.0.4- Oracle Linux)
May 4, 2019

Oracle provides Critical Patch Updates every qtr.
The ‘readme’ doc that can be downloaded with the patches has all the notes to install the patches.These notes¬†contain just specific info related to¬†Oracle 11.2.0.4 and Oracle Linux.

The dates for these updates, in 2018/2019, are:
October 16, 2018
January 15, 2019
April 16, 2019
July 16, 2019

We are going to look at PSU (Patch Set Update) and CPU (Critical Patch Update) released on July 17, 2018
for Linux x86-64 system and Oracle Version 11.2.0.4.0.

1: PSU Patch:
Patch 27734982: DATABASE PATCH SET UPDATE 11.2.0.4.180717
You will need oracle Support.
https://support.oracle.com/epmos/faces/PatchHome

https://support.oracle.com/epmos/faces/PatchHome?_adf.ctrl-state=io0p5enpi_251&_afrLoop=472556696747336

Download the complete ‘Read Me’ document for expanded instructions when you are downloading the patch. Below are shown some important steps for Installation.

A: Environment checks:
Ensure that the $PATH definition has the following executables: make, ar, ld, and nm.
The location of these executables depends on your operating system. On many operating systems, they are located in /usr/ccs/bin, in which case you can set your PATH definition as follows:
export PATH=$PATH:/usr/ccs/bin

B: One-off Patch Conflict Detection and resolution:
Determine whether any currently installed one-off patches conflict with the PSU patch as follows:
unzip p27734982_112040_.zip
cd 27734982
opatch prereq CheckConflictAgainstOHWithDetail -ph ./

The report will indicate the patches that conflict with PSU 27734982 and the patches for which PSU 27734982 is a superset.
Note that Oracle proactively provides PSU one-off patches for common conflicts with this patch.

C: Patch Installation:
*** Ensure that you shut down all the services running from the Oracle home (listner, DB, whatever)

  1. If you are using a Data Guard Physical Standby database, you must install this patch on both the primary database and the physical standby database, as described by My Oracle Support Document 278641.1.
  2. If this is an Oracle RAC environment, install the PSU patch using the OPatch rolling (no downtime) installation method as the PSU patch is rolling Oracle RAC installable. Refer to My Oracle Support Document 244241.1 Rolling Patch – OPatch Support for RAC.
  3. If this is not a Oracle RAC environment, shut down all instances and listeners associated with the Oracle home that you are updating. For more information, see Oracle Database Administrator’s Guide.
  4. Rollback any patches found during the One-off Patch Conflict Detection.
  5. Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands:
  6. unzip p27734982_112040_.zip
  7. cd 27734982
  8. opatch apply
  9. Install all resolutions to conflicts found during the One-off Patch Conflict Detection.

D: Post Patch:
Loading Modified SQL Files into the Database
The following steps load modified SQL files into the database. For an Oracle RAC environment, perform these steps on only one node.

  1. For each database instance running on the Oracle home being patched, connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:
  2. cd $ORACLE_HOME/rdbms/admin
  3. sqlplus /nolog
  4. SQL> CONNECT / AS SYSDBA
  5. SQL> STARTUP
  6. SQL> @catbundle.sql psu apply
  7. SQL> QUIT
    Running the above may make some objects invalid. To correct that:
  8. cd $ORACLE_HOME/rdbms/admin
  9. sqlplus /nolog
  10. SQL> CONNECT / AS SYSDBA
  11. SQL> @utlrp.sql

2: CPU Patch:
Patch 27923163: DATABASE PATCH SET UPDATE 11.2.0.4.180717

Download the complete ‘Read Me’ document for expanded instructions. Below are shown some important steps for Installation.

A: Environment checks:
Ensure that the $PATH definition has the following executables: make, ar, ld, and nm.
The location of these executables depends on your operating system. On many operating systems, they are located in /usr/ccs/bin, in which case you can set your PATH definition as follows:
export PATH=$PATH:/usr/ccs/bin

B: One-off Patch Conflict Detection and resolution:
Determine whether any currently installed one-off patches conflict with the PSU patch as follows:
unzip p27923163_11204_.zip
cd 27923163
opatch prereq CheckConflictAgainstOHWithDetail -ph ./

The report will indicate the patches that conflict with CSU 27923163 and the patches for which CSU 27923163 is a superset.
Note that Oracle proactively provides CSU one-off patches for common conflicts with this patch.

C: Patch Installation:
*** Ensure that you shut down all the services running from the Oracle home (listner, DB, whatever)

  1. If you are using a Data Guard Physical Standby database, you must install this patch on both the primary database and the physical standby database, as described by My Oracle Support Document 278641.1.
  2. If this is an Oracle RAC environment, install the PSU patch using the OPatch rolling (no downtime) installation method as the PSU patch is rolling Oracle RAC installable. Refer to My Oracle Support Document 244241.1 Rolling Patch – OPatch Support for RAC.
  3. If this is not a Oracle RAC environment, shut down all instances and listeners associated with the Oracle home that you are updating. For more information, see Oracle Database Administrator’s Guide.
  4. Rollback any patches found during the One-off Patch Conflict Detection.
  5. Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands:
  6. unzip p27923163_11204_.zip
  7. cd 27923163
  8. $opatch apply
  9. Verify whether the patch has been successfully installed by running the following command:
  10. $ opatch lsinventory
  11. Install all resolutions to conflicts found during the One-off Patch Conflict Detection.

D: Post Patch :
Loading Modified SQL Files into the Database

  1. Install the SQL portion of the patch by running the following command for a single instance environment.
  2. cd $ORACLE_HOME/sqlpatch/27923163
  3. sqlplus /nolog
  4. SQL> CONNECT / AS SYSDBA
  5. SQL> startup upgrade
  6. SQL> @postinstall.sql
  7. SQL> shutdown
  8. SQL> startup
    For an Oracle RAC environment, reload the packages on one of the nodes using the following commands. Make sure no other instance of the database is up on the remote nodes.
    cd $ORACLE_HOME/sqlpatch/27923163
    sqlplus /nolog
    SQL> CONNECT / AS SYSDBA
    SQL> STARTUP
    SQL> alter system set cluster_database=false scope=spfile;
    SQL> SHUTDOWN
    SQL> STARTUP UPGRADE
    SQL> @postinstall.sql
    SQL> alter system set cluster_database=true scope=spfile;
    SQL> SHUTDOWN
    SQL> STARTUP
    Running the above may make some objects invalid. To correct that:
  9. cd $ORACLE_HOME/rdbms/admin
  10. sqlplus /nolog
  11. SQL> CONNECT / AS SYSDBA
  12. SQL> @utlrp.sql

Ref Links:
Patch Set Update (PSU)
https://support.oracle.com/epmos/faces/PatchDetail?_adf.ctrl-state=apoo9q95i_280&patch_name=27338049&releaseId=80112040&patchId=27338049&languageId=0&platformId=278&_afrLoop=57404584173725

Cumulative Patch Update (CPU)
https://support.oracle.com/epmos/faces/ui/patch/PatchDetail.jspx?_afrLoop=462082042173913&parent=DOCUMENT&patchId=26925576&sourceId=2118136.2&_afrWindowMode=0&_adf.ctrl-state=vpz5t9ja9_3204

Prakash

Leave a Reply

Your email address will not be published. Required fields are marked *