Oracle RAC: Apply and Revert back latest PSU on Database Home with Conflict Detection

Published : 2019-08-19 10:06:25    Publisher :

Joel Pérez

By( Oracle ACED )&(OCE)

  In this article we will show you how to apply and revert back the latest PSU on Database Home in one node only with proper conflict detections. To do this, we must have at least 2 node RAC database.

  In my test environment:

  • Grid Home is 12.1.0.2.0

  • Oracle Home is 12.1.0.2

  • 2 Node RAC

\

  Now we need to Download latest PSU and OPatch Utility from Oracle Support website.

  • Doc ID 1454618.1 ->Quick References to Patch Numbers for Database/GI PSU, SPU (CPU), Bundle Patches and Patchsets.

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

  In my test environment

  • P24412235 ->Oct 2016 PSU for GI

  • P6880880 ->latest OPatch Utility

\

  Next Step to Install latest OPatch in Grid Home.

  • Find Database home Path

  • Take the Backup of old OPatch Utility.

  • Unzip New OPatch

\

  After Unzipping the new OPatch Utility check the latest version.

\

  TThere are 3 main steps for applying PSU

  • One-off Patch Conflict Detection and Resolution

  • Patch the database home

  • De-install the Patch from Database Home, if required

  First, we unzip the latest PSU, make sure that location must be accessible for Database User & also you have sufficient space in /tmp.

\

One-off Patch Conflict Detection and Resolution

  This step must be performed before apply PSU in any of the environment.

  The fastest and easiest way to determine whether you have one-off patches in the Oracle home that conflict with the patch, and to get the necessary conflict resolution patches and check the patches that you want to apply to your environment for conflicts.

  If no conflicts are found, you can download the patches. If conflicts are found, the tool finds an existing resolution to download. If no resolution is found, it will automatically request a resolution.

  Steps:-

  export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1

  export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$PATH

  opatchauto apply /u01/soft/24412235 -analyze -oh /u01/app/oracle/product/12.1.0.2/db_1

Note: opatchauto must be run as Root only.

Sample Output: #FormatImgID_7#

Patch the Grid Home

  The OPatch utility has automated the patch application for the Oracle Grid Infrastructure (GI) home and the Oracle RAC database homes. It operates by querying existing configurations and automating the steps required for patching each Oracle RAC database home of same version and the GI home.

  The utility must be executed by an operating system (OS) user with root privileges, and it must be executed on each node in the cluster if the GI home or Oracle RAC database home is in non-shared storage. The utility should not be run in parallel on the cluster nodes.

  Steps:

  export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1

  export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$PATH

  opatchauto apply /u01/soft/24412235 -oh /u01/app/oracle/product/12.1.0.2/db_1

  Note: opatchauto must be run as Root only.

Sample Output

\

  After PSU is successfully applied on Database Home, You can check list of patchset under this by using “lsinventory” command with OPatch utility.

Steps:

  opatch lsinventory -oh /u01/app/oracle/product/12.1.0.2/db_1

Sample output #FormatImgID_9#

De-install the Patch from Grid Home

  Now at this Point we applied latest PSU on Gird Home at one node only. After checking performance and issues occurred in our environment, we decide to revert back the PSU which was applied.

  The patch rollback instructions will differ based on the configuration of the Grid infrastructure and the Oracle RAC database homes. Roll Back steps for Oracle GI are listed below.

  export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1

  export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$PATH

  opatchauto rollback /u01/soft/24412235 -oh /u01/app/oracle/product/12.1.0.2/db_1

Note: opatchauto must be run as Root only.

Sample Output

\

  we hope this article has proved useful and we invite you to continue reading our next publications focused on Oracle RAC.

About the authors

  Joel Pérez is an Expert DBA ( Oracle ACE Director, Maximum Availability OCM, OCM Cloud Admin. & OCM12c/11g ) with over 17 years of Real World Experience in Oracle Technology, specialized in design and implement solutions of: High Availability, Disaster Recovery, Upgrades, Replication, Cloud and all area related to Oracle Databases. International consultant with duties, conferences & activities in more than 50 countries in 5 continents and countless clients around the world. Habitual and one of leading writers of Technical Oracle articles for: OTN Spanish & OTN Portuguese. Regular Speaker in worldwide Oracle events like: OTN LAD (Latin America), OTN MENA(Middle East & Africa), OTN APAC ( Asian Pacific), DTCC China and more. Joel has always been known for being a pioneer in Oracle technology since the early days of his career being the first Latin American awarded as “OTN Expert” at year 2003 by Oracle Corp., one of the first “Oracle ACE” globally in the Oracle ACE Program at year 2004 and as one of the biggest professional achievement in his career he was honoured as one of the first “OCM Database Cloud Administrator” & Maximum Availability OCM in the world. Currently Joel works as Chief Technologist in “Yunhe Enmo (Beijing) Technology Co.,Ltd”., company located in Beijing, China www.Enmotech.com

Contact Us