As we already seen how to configure Oracle One node RAC in 12cR1 and the relocation of the instance from one node to another node. In this article, let us apply the July’18 PSU patch to the same environment.
For Oracle One Node RAC configuration, please click here. Below is the configuration of the environment.
- Current OPatch Version
- Upgrade Opatch utility
- Prepare for Patching
- Applying Patch
- Patch Verification
Current OPatch Version:-
Step 1:- Current version of Opatch Tool in our environment
$ export PATH=$ORACLE_HOME/OPatch:$PATH $ $ORACLE_HOME/OPatch/opatch version OPatch Version: 18.104.22.168.3 OPatch succeeded.
From the above output,the opatch version is 22.214.171.124.3. But as per our README document, the minimum OPatch utility version shoul be 126.96.36.199.12 or later to apply this patch. Oracle recommends that you use the latest released OPatch version for 12.2, which is available for download from My Oracle Support patch 6880880 by selecting the 188.8.131.52.0 release.
Upgrade Opatch utility:-
Step 2:- Backup the existing Opatch folder
Backup the OPatch directory as root user for GRID_HOME and oracle user for ORACLE_HOME(Database) in both the nodes of the cluster. Otherwise, if we try to backup as oracle user in GRID_HOME, we will receive permission issues.
GRID_HOME: $ su - root $ cd /oradb/app/184.108.40.206/grid/ $ mv OPatch/ OPatch_bkp $ unzip <PATH_TO_PATCH>/p6880880_122010_Linux-x86-64.zip -d . $ chown -R oracle:oinstall OPatch $ chmod -R 755 OPatch ORACLE_HOME: $ su - oracle $ cd /oradb/app/oracle/product/220.127.116.11/db_1 $ mv OPatch/ OPatch_bkp $ unzip <PATH_TO_PATCH>/p6880880_122010_Linux-x86-64.zip -d . $ chmod -R 755 OPatch
Now, as oracle user verify the OPatch utility version.
$ export ORACLE_HOME=/oradb/app/18.104.22.168/grid $ export PATH=$ORACLE_HOME/OPatch:$PATH $ opatch version OPatch Version: 22.214.171.124.14 OPatch succeeded.
$ export ORACLE_HOME=/oradb/app/oracle/product/126.96.36.199/db_1 $ export PATH=$ORACLE_HOME/OPatch:$PATH $ opatch version OPatch Version: 188.8.131.52.14 OPatch succeeded.
Prepare for Patching:-
Step 3:- Preparing Node 1 to apply the PSU Patch
Now, login as root user and set the environmental variables
Step 4:- Navigate to the patch location and follow the below steps to apply the patch.
$ cd <PATH_TO_PATCH> $ unzip p27967747_121020_Linux-x86-64.zip $ cd 27967747 $ $ORACLE_HOME/OPatch/opatchauto apply ./ OPatchauto session is initiated at Wed Sep 26 02:39:52 2018 System initialization log file is /oradb/app/184.108.40.206/grid/cfgtoollogs/opatchautodb/systemconfig2018-09-26_02-40-10AM.log. Session log file is /oradb/app/220.127.116.11/grid/cfgtoollogs/opatchauto/opatchauto2018-09-26_02-41-29AM.log The id for this session is WYWB Executing OPatch prereq operations to verify patch applicability on home /oradb/app/18.104.22.168/grid Executing OPatch prereq operations to verify patch applicability on home /oradb/app/oracle/product/22.214.171.124/db_1 Patch applicability verified successfully on home /oradb/app/oracle/product/126.96.36.199/db_1 Patch applicability verified successfully on home /oradb/app/188.8.131.52/grid Verifying SQL patch applicability on home /oradb/app/oracle/product/184.108.40.206/db_1 SQL patch applicability verified successfully on home /oradb/app/oracle/product/220.127.116.11/db_1 Preparing to bring down database service on home /oradb/app/oracle/product/18.104.22.168/db_1 WARNING: The service ORCL.oracledbwr.com configured on orcl will not be switched as it is not configured to run on any other node(s). Successfully prepared home /oradb/app/oracle/product/22.214.171.124/db_1 to bring down database service Relocating RACOne home before patching on home /oradb/app/oracle/product/126.96.36.199/db_1 Relocated RACOne home before patching on home /oradb/app/oracle/product/188.8.131.52/db_1 Bringing down CRS service on home /oradb/app/184.108.40.206/grid Prepatch operation log file location: /oradb/app/220.127.116.11/grid/cfgtoollogs/crsconfig/crspatch_prodrac101_2018-09-26_02-49-04AM.log CRS service brought down successfully on home /oradb/app/18.104.22.168/grid Performing prepatch operation on home /oradb/app/oracle/product/22.214.171.124/db_1 Perpatch operation completed successfully on home /oradb/app/oracle/product/126.96.36.199/db_1 Start applying binary patch on home /oradb/app/oracle/product/188.8.131.52/db_1 Binary patch applied successfully on home /oradb/app/oracle/product/184.108.40.206/db_1 Performing postpatch operation on home /oradb/app/oracle/product/220.127.116.11/db_1 Postpatch operation completed successfully on home /oradb/app/oracle/product/18.104.22.168/db_1 Start applying binary patch on home /oradb/app/22.214.171.124/grid Binary patch applied successfully on home /oradb/app/126.96.36.199/grid Starting CRS service on home /oradb/app/188.8.131.52/grid Postpatch operation log file location: /oradb/app/184.108.40.206/grid/cfgtoollogs/crsconfig/crspatch_prodrac101_2018-09-26_03-42-46AM.log CRS service started successfully on home /oradb/app/220.127.116.11/grid Relocating back RACOne to home /oradb/app/oracle/product/18.104.22.168/db_1 Relocated back RACOne home successfully to home /oradb/app/oracle/product/22.214.171.124/db_1 Preparing home /oradb/app/oracle/product/126.96.36.199/db_1 after database service restarted No step execution required......... Trying to apply SQL patch on home /oradb/app/oracle/product/188.8.131.52/db_1 SQL patch applied successfully on home /oradb/app/oracle/product/184.108.40.206/db_1 OPatchAuto successful. --------------------------------Summary-------------------------------- Patching is completed successfully. Please find the summary as follows: Host:prodrac101 RAC Home:/oradb/app/oracle/product/220.127.116.11/db_1 Version:18.104.22.168.0 Summary: ==Following patches were SKIPPED: Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/26983807 Reason: This patch is not applicable to this specified target type - "rac_database" Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/27762277 Reason: This patch is not applicable to this specified target type - "rac_database" ==Following patches were SUCCESSFULLY applied: Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/27547329 Log: /oradb/app/oracle/product/22.214.171.124/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-26_02-55-50AM_1.log Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/27762253 Log: /oradb/app/oracle/product/126.96.36.199/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-26_02-55-50AM_1.log Host:prodrac101 CRS Home:/oradb/app/188.8.131.52/grid Version:184.108.40.206.0 Summary: ==Following patches were SUCCESSFULLY applied: Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/26983807 Log: /oradb/app/220.127.116.11/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-26_03-08-36AM_1.log Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/27547329 Log: /oradb/app/18.104.22.168/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-26_03-08-36AM_1.log Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/27762253 Log: /oradb/app/22.214.171.124/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-26_03-08-36AM_1.log Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/27762277 Log: /oradb/app/126.96.36.199/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-26_03-08-36AM_1.log OPatchauto session completed at Wed Sep 26 04:03:09 2018 Time taken to complete the session 83 minutes, 17 seconds
Step 5:- Once the patch has been applied successfully, verify it in the database like below.
$ sqlplus / as sysdba SQL> set serveroutput on SQL> exec dbms_qopatch.get_sqlpatch_status; Patch Id : 27547329 Action : APPLY Action Time : 26-SEP-2018 04:03:06 Description : DATABASE PATCH SET UPDATE 188.8.131.52.180717 Logfile : /oradb/app/oracle/cfgtoollogs/sqlpatch/27547329/22280349/27547329_apply_ORCL_201 8Sep26_04_00_51.log Status : SUCCESS PL/SQL procedure successfully completed.
Similarly, follow the same steps to apply the patch in Node 2.
Catch Me On:- Hariprasath Rajaram
FB Page: https://www.facebook.com/dbahariprasath/?